sveltekit-ui 1.0.0 → 1.0.3
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
CHANGED
|
@@ -1,23 +1,45 @@
|
|
|
1
|
-
##
|
|
1
|
+
## Setup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Refer to https://www.sveltekit-ui.com. for documentation
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
You can use an existing sveltekit project and install this package in your project with
|
|
6
|
+
`npm install sveltekit-ui`
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
or to start a new project with a starter template (recommended). In your terminal cd into a folder you want to put your project files in such as /projects/my-project-all to use as the parent folder for stuff related to your project (but replace "my-project" with your own project name)
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
wait until july 1st for this part create-sveltekit-ui-site
|
|
11
|
+
|
|
12
|
+
`npx create-sveltekit-ui-site my-project`
|
|
13
|
+
|
|
14
|
+
## Open Code Editor
|
|
15
|
+
|
|
16
|
+
`code .` should open the project in your code editor such as vscode
|
|
17
|
+
|
|
18
|
+
## Update Package
|
|
19
|
+
|
|
20
|
+
It's possible the starter template is a few updates behind. Check for updates by running `ncu -u`. You should run that periodically to keep the latest version of our components
|
|
13
21
|
|
|
14
22
|
## Developing
|
|
15
23
|
|
|
16
24
|
Once you've created a project and installed dependencies start a development server:
|
|
17
25
|
|
|
18
26
|
```bash
|
|
27
|
+
npm i
|
|
19
28
|
npm run dev
|
|
20
|
-
|
|
21
|
-
# or start the server and open the app in a new browser tab
|
|
22
|
-
npm run dev -- --open
|
|
23
29
|
```
|
|
30
|
+
|
|
31
|
+
## Browser
|
|
32
|
+
|
|
33
|
+
That should spit out a url like http://localhost:5173/ where you should see your starting website.
|
|
34
|
+
|
|
35
|
+
## Branding
|
|
36
|
+
|
|
37
|
+
You'll want to create a Logo at some point and use that in the nav bar, browser tab, google search results, etc. If you can make an svg that is best but an image will work as well. If you are advanced I like https://affinity.serif.com/en-us/designer/ for macbook to make my logos and other graphics. It has a generous free trial period too.
|
|
38
|
+
|
|
39
|
+
I like https://jakearchibald.github.io/svgomg/ to minify svg code and set to viewbox etc. Then you can generate favicons with https://realfavicongenerator.net
|
|
40
|
+
|
|
41
|
+
download the favicons and drop them in the folder called static and overwrite the existing example ones. You dont need favicon.ico. Also add favicon.svg and favicon-inactive.svg if you want to show different icon when the browser tab is inactive (not at all a priority though)
|
|
42
|
+
|
|
43
|
+
## Other
|
|
44
|
+
|
|
45
|
+
Ask an ai for help if you have issues in your setup process.
|
|
@@ -7553,7 +7553,7 @@ export const docs_overview_code_sample = `<script>
|
|
|
7553
7553
|
create_text_input_manager,
|
|
7554
7554
|
TextInput,
|
|
7555
7555
|
copy_to_clipboard,
|
|
7556
|
-
} from "
|
|
7556
|
+
} from "sveltekit-ui"
|
|
7557
7557
|
|
|
7558
7558
|
let manager = $state(null)
|
|
7559
7559
|
|
|
@@ -7596,12 +7596,12 @@ export const docs_overview_code_sample = `<script>
|
|
|
7596
7596
|
export function docs_definition_to_sample_code(definition) {
|
|
7597
7597
|
return definition?.is_not_builder
|
|
7598
7598
|
? `<script>
|
|
7599
|
-
import { ${definition?.component_name} } from "
|
|
7599
|
+
import { ${definition?.component_name} } from "sveltekit-ui"
|
|
7600
7600
|
<\/script>
|
|
7601
7601
|
|
|
7602
7602
|
<${definition?.component_name} some_property="example" />`
|
|
7603
7603
|
: `<script>
|
|
7604
|
-
import { ${definition?.builder_function_name}, ${definition?.component_name} } from "
|
|
7604
|
+
import { ${definition?.builder_function_name}, ${definition?.component_name} } from "sveltekit-ui"
|
|
7605
7605
|
|
|
7606
7606
|
let example_${definition?.builder_function_name?.slice(7)} = ${definition?.builder_function_name}({
|
|
7607
7607
|
some_config_property: "example"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sveltekit-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "A SvelteKit UI component library for building modern web applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"context-filter-polyfill": "^0.3.23",
|
|
21
21
|
"qr-code-styling": "^1.9.2",
|
|
22
|
-
"svelte": "^5.
|
|
22
|
+
"svelte": "^5.35.2"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@sveltejs/kit": "^2.22.2"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@sveltejs/vite-plugin-svelte": "^5.1.0",
|
|
32
32
|
"@vercel/analytics": "^1.5.0",
|
|
33
33
|
"typescript": "^5.8.3",
|
|
34
|
-
"vite": "^
|
|
34
|
+
"vite": "^7.0.1"
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://www.sveltekit-ui.com",
|
|
37
37
|
"keywords": [
|
|
@@ -7553,7 +7553,7 @@ export const docs_overview_code_sample = `<script>
|
|
|
7553
7553
|
create_text_input_manager,
|
|
7554
7554
|
TextInput,
|
|
7555
7555
|
copy_to_clipboard,
|
|
7556
|
-
} from "
|
|
7556
|
+
} from "sveltekit-ui"
|
|
7557
7557
|
|
|
7558
7558
|
let manager = $state(null)
|
|
7559
7559
|
|
|
@@ -7596,12 +7596,12 @@ export const docs_overview_code_sample = `<script>
|
|
|
7596
7596
|
export function docs_definition_to_sample_code(definition) {
|
|
7597
7597
|
return definition?.is_not_builder
|
|
7598
7598
|
? `<script>
|
|
7599
|
-
import { ${definition?.component_name} } from "
|
|
7599
|
+
import { ${definition?.component_name} } from "sveltekit-ui"
|
|
7600
7600
|
<\/script>
|
|
7601
7601
|
|
|
7602
7602
|
<${definition?.component_name} some_property="example" />`
|
|
7603
7603
|
: `<script>
|
|
7604
|
-
import { ${definition?.builder_function_name}, ${definition?.component_name} } from "
|
|
7604
|
+
import { ${definition?.builder_function_name}, ${definition?.component_name} } from "sveltekit-ui"
|
|
7605
7605
|
|
|
7606
7606
|
let example_${definition?.builder_function_name?.slice(7)} = ${definition?.builder_function_name}({
|
|
7607
7607
|
some_config_property: "example"
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import "$lib/style.css"
|
|
3
|
-
import Logo from "../notlib/assets/static/Logo/index.svelte"
|
|
4
3
|
import Layout from "$lib/Components/Layout/index.svelte"
|
|
5
4
|
import { create_layout_manager } from "$lib/Components/Layout/index.svelte.js"
|
|
6
5
|
import Button from "$lib/Components/Button/index.svelte"
|
|
@@ -47,7 +46,7 @@
|
|
|
47
46
|
{ name: "Cron Input", key: "cron_input" },
|
|
48
47
|
{ name: "Dropdown", key: "dropdown" },
|
|
49
48
|
{ name: "File Input", key: "file_input" },
|
|
50
|
-
{ name: "Function Input", key: "function_input" },
|
|
49
|
+
// { name: "Function Input", key: "function_input" },
|
|
51
50
|
{ name: "Icon", key: "icon" },
|
|
52
51
|
{ name: "Icon Input", key: "icon_input" },
|
|
53
52
|
{ name: "Image", key: "image" },
|
|
@@ -104,10 +103,14 @@
|
|
|
104
103
|
|
|
105
104
|
<Layout manager={layout_manager}>
|
|
106
105
|
{#snippet nav_bar_logo()}
|
|
107
|
-
<
|
|
106
|
+
<div class="container" style="--color1: var(--primary-t);">
|
|
107
|
+
<h1 class="logotext">Sveltekit-UI</h1>
|
|
108
|
+
</div>
|
|
108
109
|
{/snippet}
|
|
109
110
|
{#snippet app_nav_bar_logo()}
|
|
110
|
-
<
|
|
111
|
+
<div class="container" style="--color1: var(--primary-t);">
|
|
112
|
+
<h1 class="logotext">Sveltekit-UI</h1>
|
|
113
|
+
</div>
|
|
111
114
|
{/snippet}
|
|
112
115
|
{#snippet nav_bar_extra()}
|
|
113
116
|
<div style="display: flex; align-iems: center; gap: .5rem;">
|
|
@@ -173,4 +176,21 @@
|
|
|
173
176
|
font-weight: 100 1000;
|
|
174
177
|
font-display: swap;
|
|
175
178
|
}
|
|
179
|
+
.container {
|
|
180
|
+
display: flex;
|
|
181
|
+
flex-direction: column;
|
|
182
|
+
align-items: center;
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
}
|
|
185
|
+
.logotext {
|
|
186
|
+
font-family: "Quicksand", sans-serif;
|
|
187
|
+
width: max-content;
|
|
188
|
+
z-index: 1;
|
|
189
|
+
font-size: clamp(2rem, 5.2vw, 2.6rem) !important;
|
|
190
|
+
font-weight: 700 !important;
|
|
191
|
+
color: var(--color1);
|
|
192
|
+
font-size: var(--font_size);
|
|
193
|
+
letter-spacing: 0.02rem;
|
|
194
|
+
line-height: clamp(2.2rem, 5.2vw, 2.9rem);
|
|
195
|
+
}
|
|
176
196
|
</style>
|
package/src/routes/+page.svelte
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Button from "$lib/Components/Button/index.svelte"
|
|
3
3
|
import { create_button_manager } from "$lib/Components/Button/index.svelte.js"
|
|
4
|
-
import { goto } from "$app/navigation"
|
|
5
4
|
import Code from "$lib/Components/Code/index.svelte"
|
|
6
5
|
import { create_code_manager } from "$lib/Components/Code/index.svelte.js"
|
|
6
|
+
import { goto } from "$app/navigation"
|
|
7
7
|
import { definitions, docs_definition_to_sample_code, docs_overview_code_sample } from "$lib/client/docs/index.js"
|
|
8
8
|
import { copy_to_clipboard } from "$lib/client/index.js"
|
|
9
9
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
content: docs_overview_code_sample,
|
|
20
20
|
})
|
|
21
21
|
|
|
22
|
-
const overview_intro = `Each component can be combined into a more complex component. This is intended for sveltekit projects. The whole "tree" of
|
|
22
|
+
const overview_intro = `Each component can be combined into a more complex component. This is intended for sveltekit projects. The whole "tree" of components should be initialized at the parent-most level which is likely in the <script> tags of a +page.svelte file.`
|
|
23
23
|
|
|
24
24
|
let copy_all_docs_button_manager = create_button_manager({
|
|
25
25
|
type: "outlined",
|
|
@@ -51,16 +51,17 @@ below are the docs for each component individually
|
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
<div class="container">
|
|
54
|
-
<h1>
|
|
54
|
+
<h1>Welcome to Sveltekit-UI</h1>
|
|
55
55
|
<p>
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
Our components use svelte 5 runes. We have taken an approach where components are mostly built in javascript to
|
|
57
|
+
allow for control of your entire tree of components in one parent object that can then be passed down through all
|
|
58
|
+
HTML and CSS components
|
|
58
59
|
</p>
|
|
59
60
|
<p>
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
After a lot of work these components are in a state that we are happy to release to the public and encourage people
|
|
62
|
+
to use. You can also go to <a href="https://www.contibase.com/code_generate">www.contibase.com/code_generate</a> to help
|
|
63
|
+
you build with sveltekit-ui. Contibase is also a very compatable project to use along side Sveltekit-UI.
|
|
62
64
|
</p>
|
|
63
|
-
<p>{overview_intro}</p>
|
|
64
65
|
<br />
|
|
65
66
|
<Code manager={overview_sample_code_manager} />
|
|
66
67
|
<p>Explore the docs for details on each individual component</p>
|
|
@@ -74,7 +75,7 @@ below are the docs for each component individually
|
|
|
74
75
|
<style>
|
|
75
76
|
.container {
|
|
76
77
|
margin: auto;
|
|
77
|
-
padding: 2rem;
|
|
78
|
+
padding: 0 2rem 10rem 2rem;
|
|
78
79
|
max-width: 60rem;
|
|
79
80
|
}
|
|
80
81
|
p {
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
let { color1 = "var(--primary-t)" } = $props()
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<div class="container" style="--color1: {color1};">
|
|
6
|
-
<h1 class="logotext">Sveltekit-UI</h1>
|
|
7
|
-
</div>
|
|
8
|
-
|
|
9
|
-
<style>
|
|
10
|
-
.container {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
align-items: center;
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
}
|
|
16
|
-
.logotext {
|
|
17
|
-
font-family: "Quicksand", sans-serif;
|
|
18
|
-
width: max-content;
|
|
19
|
-
z-index: 1;
|
|
20
|
-
font-size: clamp(2rem, 5.2vw, 2.6rem) !important;
|
|
21
|
-
font-weight: 700 !important;
|
|
22
|
-
color: var(--color1);
|
|
23
|
-
font-size: var(--font_size);
|
|
24
|
-
letter-spacing: 0.02rem;
|
|
25
|
-
line-height: clamp(2.2rem, 5.2vw, 2.9rem);
|
|
26
|
-
}
|
|
27
|
-
</style>
|