Skip to content

Commit 88a3365

Browse files
committed
#8 add page components and examples, add page to index.ts and status of v0.0.28
1 parent afe10be commit 88a3365

File tree

17 files changed

+630
-30
lines changed

17 files changed

+630
-30
lines changed

package-lock.json

Lines changed: 514 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.0.27",
44
"private": false,
55
"scripts": {
6-
"dev": "vite dev --host",
6+
"dev": "vite dev",
77
"package": "svelte-package --watch",
88
"build": "vite build",
99
"build package": "svelte-kit sync && svelte-package --watch",
@@ -20,7 +20,7 @@
2020
},
2121
"devDependencies": {
2222
"@playwright/test": "^1.28.1",
23-
"@skeletonlabs/skeleton": "^1.2.5",
23+
"@skeletonlabs/skeleton": "^1.6.0",
2424
"@sveltejs/adapter-auto": "^2.0.0",
2525
"@sveltejs/adapter-static": "^2.0.2",
2626
"@sveltejs/kit": "^1.5.0",

src/app.postcss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ html,
33
body {
44
@apply h-full bg-white;
55
}
6+
7+
[type='text']:focus{
8+
--tw-ring-color:#00000;
9+
}

src/docs/navigation_link.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export const menuNavLinks: any = [
2222
id: 'components',
2323
title: 'Components',
2424
list: [
25+
{ href: base + '/components/core', label: 'Core', keywords: '' },
2526
{ href: base + '/components/icon', label: 'Icons', keywords: '' },
2627
{ href: base + '/components/form', label: 'Form', keywords: '' },
2728
{ href: base + '/components/table', label: 'Table', keywords: '' }
Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1-
<div class="px-5 grid gap-5">
2-
<slot/>
3-
</div>
1+
<script lang="ts">
2+
3+
import type { Link } from "$lib/models/Models";
4+
5+
export let title = "";
6+
export let note = "";
7+
export let links:Link[]=[];
8+
9+
</script>
10+
11+
<div class="px-5 grid gap-5" >
12+
<h1>{title}</h1>
13+
{#if note}
14+
<blockquote class="blockquote">{note}</blockquote>
15+
{/if}
16+
17+
<slot name="description" />
18+
19+
{#if links.length>0}
20+
<div class="py-5">
21+
{#each links as link}
22+
<a class="chip variant-ringed" href={link.url}>{link.label}</a>
23+
{/each}
24+
</div>
25+
{/if}
26+
<slot/>
27+
</div>
28+

src/lib/css/core.ui.css

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/lib/css/core.ui.postcss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*place global styles here */
2+
html, body { @apply h-full}
3+
4+
h1{
5+
@apply text-primary-500;
6+
}
7+
8+
:root {
9+
--background:rgb(var(--color-surface-200))
10+
}

src/lib/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ import FileIcon from './components/file/FileIcon.svelte';
66
import FileInfo from './components/file/FileInfo.svelte';
77
import FileUploader from './components/file/FileUploader.svelte';
88

9+
//page
910
import Spinner from './components/spinner/Spinner.svelte';
11+
import Page from './components/page/Page.svelte';
1012

13+
// input
1114
import Checkbox from './components/form/Checkbox.svelte';
1215
import CheckboxKVPList from './components/form/CheckboxKvPList.svelte';
1316
import CheckboxList from './components/form/CheckboxList.svelte';
@@ -40,7 +43,7 @@ export {
4043
export { FileInfo, FileIcon, FileUploader };
4144

4245
//others
43-
export { ListView, TableView, Spinner };
46+
export { ListView, TableView, Spinner, Page };
4447

4548
//Api
4649
export { Api } from './services/Api.js';

src/lib/models/Models.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ import type { SvelteComponent } from 'svelte';
22
import type { ColumnFilterFn } from 'svelte-headless-table/lib/plugins';
33
import type { Writable } from 'svelte/store';
44

5+
// page
6+
export interface Link
7+
{
8+
label:string,
9+
url:string
10+
}
11+
12+
// Form
513
export interface Input {
614
id: string;
715
label: string;

src/routes/+layout.svelte

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
<script lang="ts">
22
// The ordering of these imports is critical to your app working properly
3-
// import '@skeletonlabs/skeleton/themes/theme-skeleton.css';
4-
import '$lib/css/themes/theme-bexis2.css';
5-
// If you have source.organizeImports set to true in VSCode, then it will auto change this ordering
6-
import '@skeletonlabs/skeleton/styles/all.css';
7-
// Most of your app wide CSS should be put in this file
8-
import '../app.postcss';
93
// For the floating UI elements such as column filters
104
import { computePosition, autoUpdate, offset, shift, flip, arrow } from '@floating-ui/dom';
115
import { storePopup } from '@skeletonlabs/skeleton';
@@ -23,6 +17,14 @@
2317
storeHighlightJs.set(hljs);
2418
// storeHighlightJs.set(hljs2);
2519
20+
// import '@skeletonlabs/skeleton/themes/theme-skeleton.css';
21+
import '$lib/css/themes/theme-bexis2.css';
22+
// If you have source.organizeImports set to true in VSCode, then it will auto change this ordering
23+
import '@skeletonlabs/skeleton/styles/all.css';
24+
// Most of your app wide CSS should be put in this file
25+
import '../app.postcss';
26+
27+
2628
</script>
2729

2830
<AppShell

0 commit comments

Comments
 (0)