spaper 0.8.6 → 0.9.6
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 +6 -0
- package/components/Form/Form.svelte +7 -1
- package/components/Form/Radio.svelte +7 -1
- package/components/Form/Radio.svelte.d.ts +3 -1
- package/components/Skeleton.svelte +55 -0
- package/components/Skeleton.svelte.d.ts +22 -0
- package/components/Table.svelte +2 -1
- package/components/Table.svelte.d.ts +24 -0
- package/index.d.ts +2 -1
- package/index.js +2 -1
- package/package.json +2 -1
- package/types.d.ts +9 -0
package/README.md
CHANGED
|
@@ -63,6 +63,12 @@ Thanks to these generous people! :heart:
|
|
|
63
63
|
<sub><b>mehdi-dalil</b></sub>
|
|
64
64
|
</a>
|
|
65
65
|
</td>
|
|
66
|
+
<td align="center">
|
|
67
|
+
<a href="https://github.com/t0kido">
|
|
68
|
+
<img src="https://avatars.githubusercontent.com/u/12486500?v=4" width="80px;" alt=""/><br />
|
|
69
|
+
<sub><b>t0kido</b></sub>
|
|
70
|
+
</a>
|
|
71
|
+
</td>
|
|
66
72
|
</tr>
|
|
67
73
|
</table>
|
|
68
74
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{#if active}
|
|
2
|
+
{#each { length: count } as _}
|
|
3
|
+
{@const borderType = Math.floor(Math.random() * 6 + 1)}
|
|
4
|
+
<div {...$$restProps}
|
|
5
|
+
aria-hidden="true"
|
|
6
|
+
aria-valuetext={ariaValueText}
|
|
7
|
+
tabindex="-1"
|
|
8
|
+
role="progressbar"
|
|
9
|
+
class="border border-{borderType} margin-small"
|
|
10
|
+
class:animated
|
|
11
|
+
class:circle
|
|
12
|
+
class:inline>
|
|
13
|
+
</div>
|
|
14
|
+
{/each}
|
|
15
|
+
{/if}
|
|
16
|
+
|
|
17
|
+
<script >export let active = true;
|
|
18
|
+
export let count = 1;
|
|
19
|
+
export let animated = true;
|
|
20
|
+
export let circle = false;
|
|
21
|
+
export let inline = false;
|
|
22
|
+
export let ariaValueText = 'Loading...';
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style >:global(.dark) div {
|
|
26
|
+
--mid-gradient: var(--primary-dark);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
div {
|
|
30
|
+
cursor: progress;
|
|
31
|
+
border-color: transparent;
|
|
32
|
+
width: var(--width, auto);
|
|
33
|
+
min-height: 1rem;
|
|
34
|
+
height: var(--height, 100%);
|
|
35
|
+
background: var(--muted-light-10);
|
|
36
|
+
background: linear-gradient(95deg, var(--muted-light-10) 5%, var(--mid-gradient, var(--muted-light)) 20%, var(--muted-light-10) 50%);
|
|
37
|
+
background-size: 200% 100%;
|
|
38
|
+
}
|
|
39
|
+
div.circle {
|
|
40
|
+
border-radius: 50%;
|
|
41
|
+
}
|
|
42
|
+
div.inline {
|
|
43
|
+
display: inline-block;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
47
|
+
.animated {
|
|
48
|
+
animation: loading 2s linear infinite alternate;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
@keyframes loading {
|
|
52
|
+
to {
|
|
53
|
+
background-position-x: -200%;
|
|
54
|
+
}
|
|
55
|
+
}</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
active?: boolean;
|
|
6
|
+
count?: number;
|
|
7
|
+
animated?: boolean;
|
|
8
|
+
circle?: boolean;
|
|
9
|
+
inline?: boolean;
|
|
10
|
+
ariaValueText?: string;
|
|
11
|
+
};
|
|
12
|
+
events: {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
};
|
|
15
|
+
slots: {};
|
|
16
|
+
};
|
|
17
|
+
export declare type SkeletonProps = typeof __propDef.props;
|
|
18
|
+
export declare type SkeletonEvents = typeof __propDef.events;
|
|
19
|
+
export declare type SkeletonSlots = typeof __propDef.slots;
|
|
20
|
+
export default class Skeleton extends SvelteComponentTyped<SkeletonProps, SkeletonEvents, SkeletonSlots> {
|
|
21
|
+
}
|
|
22
|
+
export {};
|
package/components/Table.svelte
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { TableColumn as Column } from '../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
columns?: Column[];
|
|
7
|
+
data?: {}[];
|
|
8
|
+
striped?: boolean;
|
|
9
|
+
hoverable?: boolean;
|
|
10
|
+
showHeader?: boolean;
|
|
11
|
+
headerCLass?: string;
|
|
12
|
+
cellCLass?: string;
|
|
13
|
+
};
|
|
14
|
+
events: {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
};
|
|
17
|
+
slots: {};
|
|
18
|
+
};
|
|
19
|
+
export declare type TableProps = typeof __propDef.props;
|
|
20
|
+
export declare type TableEvents = typeof __propDef.events;
|
|
21
|
+
export declare type TableSlots = typeof __propDef.slots;
|
|
22
|
+
export default class Table extends SvelteComponentTyped<TableProps, TableEvents, TableSlots> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
package/index.d.ts
CHANGED
|
@@ -16,4 +16,5 @@ import Pagination from './components/Pagination';
|
|
|
16
16
|
import Toast from './components/Toast';
|
|
17
17
|
import CloseButton from './components/CloseButton.svelte';
|
|
18
18
|
import CopyButton from './components/CopyButton.svelte';
|
|
19
|
-
|
|
19
|
+
import Skeleton from './components/Skeleton.svelte';
|
|
20
|
+
export { Button, Alert, Badge, Breadcrumb, Navbar, Modal, Tabs, Tab, Form, Input, Select, Radio, Checkbox, Switch, Slider, Article, Card, Collapsible, Popover, Progress, Table, Pagination, Toast, CloseButton, CopyButton, Skeleton, };
|
package/index.js
CHANGED
|
@@ -16,4 +16,5 @@ import Pagination from './components/Pagination';
|
|
|
16
16
|
import Toast from './components/Toast';
|
|
17
17
|
import CloseButton from './components/CloseButton.svelte';
|
|
18
18
|
import CopyButton from './components/CopyButton.svelte';
|
|
19
|
-
|
|
19
|
+
import Skeleton from './components/Skeleton.svelte';
|
|
20
|
+
export { Button, Alert, Badge, Breadcrumb, Navbar, Modal, Tabs, Tab, Form, Input, Select, Radio, Checkbox, Switch, Slider, Article, Card, Collapsible, Popover, Progress, Table, Pagination, Toast, CloseButton, CopyButton, Skeleton, };
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"papercss",
|
|
9
9
|
"components"
|
|
10
10
|
],
|
|
11
|
-
"version": "0.
|
|
11
|
+
"version": "0.9.6",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "git+https://github.com/Oli8/spaper.git"
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"./components/Pagination": "./components/Pagination/index.js",
|
|
52
52
|
"./components/Popover.svelte": "./components/Popover.svelte",
|
|
53
53
|
"./components/Progress.svelte": "./components/Progress.svelte",
|
|
54
|
+
"./components/Skeleton.svelte": "./components/Skeleton.svelte",
|
|
54
55
|
"./components/Table.svelte": "./components/Table.svelte",
|
|
55
56
|
"./components/Tabs/Tab.svelte": "./components/Tabs/Tab.svelte",
|
|
56
57
|
"./components/Tabs/Tabs.svelte": "./components/Tabs/Tabs.svelte",
|
package/types.d.ts
CHANGED
|
@@ -11,3 +11,12 @@ export type Attributes = Record<string, string|boolean>;
|
|
|
11
11
|
export type PositionY = 'top' | 'bottom';
|
|
12
12
|
export type PositionX = 'left' | 'right';
|
|
13
13
|
export type Position = PositionX | PositionY;
|
|
14
|
+
|
|
15
|
+
export interface TableColumnObj {
|
|
16
|
+
field: string;
|
|
17
|
+
label?: string;
|
|
18
|
+
content?: (text?: string) => string;
|
|
19
|
+
html?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type TableColumn = TableColumnObj | string;
|