spaper 1.4.0 → 2.0.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/README.md +20 -59
- package/dist/components/Alert.svelte +83 -0
- package/dist/components/Alert.svelte.d.ts +15 -0
- package/dist/components/Article.svelte +63 -0
- package/dist/components/Article.svelte.d.ts +17 -0
- package/dist/components/Avatar/Avatar.svelte +102 -0
- package/dist/components/Avatar/Avatar.svelte.d.ts +16 -0
- package/dist/components/Avatar/AvatarGroup.svelte +21 -0
- package/dist/components/Avatar/AvatarGroup.svelte.d.ts +9 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Avatar/index.js +2 -0
- package/dist/components/Breadcrumb.svelte +33 -0
- package/dist/components/Breadcrumb.svelte.d.ts +12 -0
- package/dist/components/Button.svelte +174 -0
- package/dist/components/Button.svelte.d.ts +33 -0
- package/dist/components/Card.svelte +101 -0
- package/dist/components/Card.svelte.d.ts +22 -0
- package/dist/components/Carousel/Carousel.svelte +204 -0
- package/dist/components/Carousel/Carousel.svelte.d.ts +27 -0
- package/dist/components/Carousel/CarouselItem.svelte +48 -0
- package/dist/components/Carousel/CarouselItem.svelte.d.ts +7 -0
- package/{components → dist/components}/Carousel/index.d.ts +1 -0
- package/dist/components/Carousel/types.d.ts +22 -0
- package/dist/components/CloseButton.svelte +34 -0
- package/dist/components/CloseButton.svelte.d.ts +8 -0
- package/dist/components/Collapsible.svelte +64 -0
- package/dist/components/Collapsible.svelte.d.ts +16 -0
- package/dist/components/CopyButton.svelte +54 -0
- package/dist/components/CopyButton.svelte.d.ts +13 -0
- package/dist/components/Divider.svelte +9 -0
- package/dist/components/Divider.svelte.d.ts +6 -0
- package/dist/components/Form/Checkbox.svelte +54 -0
- package/dist/components/Form/Checkbox.svelte.d.ts +15 -0
- package/dist/components/Form/Input.svelte +105 -0
- package/dist/components/Form/Input.svelte.d.ts +21 -0
- package/dist/components/Form/NumberInput/DecrementButton.svelte +14 -0
- package/dist/components/Form/NumberInput/DecrementButton.svelte.d.ts +9 -0
- package/dist/components/Form/NumberInput/IncrementButton.svelte +14 -0
- package/dist/components/Form/NumberInput/IncrementButton.svelte.d.ts +9 -0
- package/dist/components/Form/NumberInput/NumberInput.svelte +227 -0
- package/dist/components/Form/NumberInput/NumberInput.svelte.d.ts +34 -0
- package/dist/components/Form/Radio.svelte +42 -0
- package/dist/components/Form/Radio.svelte.d.ts +13 -0
- package/dist/components/Form/Select.svelte +61 -0
- package/dist/components/Form/Select.svelte.d.ts +12 -0
- package/dist/components/Form/Slider.svelte +129 -0
- package/dist/components/Form/Slider.svelte.d.ts +22 -0
- package/dist/components/Form/Switch.svelte +101 -0
- package/dist/components/Form/Switch.svelte.d.ts +22 -0
- package/dist/components/Form/index.d.ts +9 -0
- package/{components → dist/components}/Form/index.js +1 -2
- package/dist/components/Hero.svelte +78 -0
- package/dist/components/Hero.svelte.d.ts +17 -0
- package/dist/components/Icon.svelte +102 -0
- package/dist/components/Icon.svelte.d.ts +27 -0
- package/dist/components/Modal/Modal.svelte +120 -0
- package/dist/components/Modal/Modal.svelte.d.ts +19 -0
- package/dist/components/Modal/index.d.ts +12 -0
- package/dist/components/Modal/index.js +30 -0
- package/dist/components/Navbar.svelte +98 -0
- package/dist/components/Navbar.svelte.d.ts +11 -0
- package/dist/components/Pagination/Arrow.svelte +29 -0
- package/dist/components/Pagination/Arrow.svelte.d.ts +8 -0
- package/dist/components/Pagination/NavigationButton.svelte +33 -0
- package/dist/components/Pagination/NavigationButton.svelte.d.ts +13 -0
- package/dist/components/Pagination/Pagination.svelte +209 -0
- package/dist/components/Pagination/Pagination.svelte.d.ts +32 -0
- package/{components → dist/components}/Pagination/arrow-dimension.js +3 -3
- package/{components → dist/components}/Pagination/index.d.ts +1 -1
- package/dist/components/Popover.svelte +64 -0
- package/dist/components/Popover.svelte.d.ts +17 -0
- package/dist/components/Progress.svelte +87 -0
- package/dist/components/Progress.svelte.d.ts +19 -0
- package/dist/components/ScrollTop.svelte +79 -0
- package/dist/components/ScrollTop.svelte.d.ts +17 -0
- package/dist/components/Skeleton.svelte +104 -0
- package/dist/components/Skeleton.svelte.d.ts +21 -0
- package/dist/components/Spinner.svelte +59 -0
- package/dist/components/Spinner.svelte.d.ts +16 -0
- package/dist/components/Table/Table.svelte +292 -0
- package/dist/components/Table/Table.svelte.d.ts +25 -0
- package/dist/components/Table/TableColumn.svelte +62 -0
- package/dist/components/Table/TableColumn.svelte.d.ts +15 -0
- package/dist/components/Table/context.d.ts +13 -0
- package/dist/components/Table/context.js +1 -0
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.js +2 -0
- package/dist/components/Tabs/Tab.svelte +90 -0
- package/dist/components/Tabs/Tab.svelte.d.ts +14 -0
- package/dist/components/Tabs/Tabs.svelte +138 -0
- package/dist/components/Tabs/Tabs.svelte.d.ts +13 -0
- package/{components → dist/components}/Tabs/utils.d.ts +4 -3
- package/dist/components/Tag.svelte +38 -0
- package/dist/components/Tag.svelte.d.ts +10 -0
- package/dist/components/Toast/Toast.svelte +105 -0
- package/dist/components/Toast/Toast.svelte.d.ts +6 -0
- package/dist/components/Toast/ToastContainer.svelte +101 -0
- package/dist/components/Toast/ToastContainer.svelte.d.ts +8 -0
- package/{components → dist/components}/Toast/index.d.ts +19 -5
- package/dist/components/Toast/index.js +100 -0
- package/dist/icons.d.ts +3 -0
- package/dist/icons.js +2 -0
- package/dist/index.d.ts +31 -0
- package/{index.js → dist/index.js} +10 -5
- package/dist/type-icons.d.ts +4 -0
- package/dist/type-icons.js +9 -0
- package/dist/types.d.ts +29 -0
- package/dist/utils.d.ts +16 -0
- package/dist/utils.js +44 -0
- package/package.json +70 -68
- package/components/Alert.svelte +0 -34
- package/components/Alert.svelte.d.ts +0 -21
- package/components/Article.svelte +0 -39
- package/components/Article.svelte.d.ts +0 -26
- package/components/Badge.svelte +0 -16
- package/components/Badge.svelte.d.ts +0 -20
- package/components/Breadcrumb.svelte +0 -17
- package/components/Breadcrumb.svelte.d.ts +0 -21
- package/components/Button.svelte +0 -41
- package/components/Button.svelte.d.ts +0 -30
- package/components/Card.svelte +0 -70
- package/components/Card.svelte.d.ts +0 -32
- package/components/Carousel/Carousel.svelte +0 -128
- package/components/Carousel/Carousel.svelte.d.ts +0 -35
- package/components/Carousel/CarouselItem.svelte +0 -32
- package/components/Carousel/CarouselItem.svelte.d.ts +0 -18
- package/components/Carousel/types.d.ts +0 -14
- package/components/CloseButton.svelte +0 -23
- package/components/CloseButton.svelte.d.ts +0 -19
- package/components/Collapsible.svelte +0 -49
- package/components/Collapsible.svelte.d.ts +0 -21
- package/components/CopyButton.svelte +0 -43
- package/components/CopyButton.svelte.d.ts +0 -24
- package/components/Form/Checkbox.svelte +0 -37
- package/components/Form/Checkbox.svelte.d.ts +0 -26
- package/components/Form/Form.svelte +0 -22
- package/components/Form/Form.svelte.d.ts +0 -26
- package/components/Form/Input.svelte +0 -67
- package/components/Form/Input.svelte.d.ts +0 -28
- package/components/Form/NumberInput/DecrementButton.svelte +0 -9
- package/components/Form/NumberInput/DecrementButton.svelte.d.ts +0 -19
- package/components/Form/NumberInput/IncrementButton.svelte +0 -9
- package/components/Form/NumberInput/IncrementButton.svelte.d.ts +0 -19
- package/components/Form/NumberInput/NumberInput.svelte +0 -129
- package/components/Form/NumberInput/NumberInput.svelte.d.ts +0 -36
- package/components/Form/Radio.svelte +0 -26
- package/components/Form/Radio.svelte.d.ts +0 -25
- package/components/Form/Select.svelte +0 -40
- package/components/Form/Select.svelte.d.ts +0 -24
- package/components/Form/Slider.svelte +0 -124
- package/components/Form/Slider.svelte.d.ts +0 -30
- package/components/Form/Switch.svelte +0 -71
- package/components/Form/index.d.ts +0 -10
- package/components/Form/style.scss +0 -4
- package/components/Hero.svelte +0 -78
- package/components/Hero.svelte.d.ts +0 -26
- package/components/Layout/Col.svelte +0 -25
- package/components/Layout/Col.svelte.d.ts +0 -27
- package/components/Layout/Row.svelte +0 -24
- package/components/Layout/Row.svelte.d.ts +0 -26
- package/components/Layout/index.d.ts +0 -2
- package/components/Layout/index.js +0 -2
- package/components/Modal/Modal.svelte +0 -62
- package/components/Modal/Modal.svelte.d.ts +0 -28
- package/components/Modal/index.d.ts +0 -13
- package/components/Modal/index.js +0 -17
- package/components/Navbar.svelte +0 -40
- package/components/Navbar.svelte.d.ts +0 -22
- package/components/Pagination/Arrow.svelte +0 -17
- package/components/Pagination/Arrow.svelte.d.ts +0 -19
- package/components/Pagination/NavigationButton.svelte +0 -23
- package/components/Pagination/NavigationButton.svelte.d.ts +0 -23
- package/components/Pagination/Pagination.svelte +0 -137
- package/components/Pagination/Pagination.svelte.d.ts +0 -36
- package/components/Popover.svelte +0 -62
- package/components/Popover.svelte.d.ts +0 -25
- package/components/Progress.svelte +0 -39
- package/components/Progress.svelte.d.ts +0 -25
- package/components/Skeleton.svelte +0 -55
- package/components/Skeleton.svelte.d.ts +0 -22
- package/components/Table.svelte +0 -73
- package/components/Table.svelte.d.ts +0 -24
- package/components/Tabs/Tab.svelte +0 -52
- package/components/Tabs/Tab.svelte.d.ts +0 -20
- package/components/Tabs/Tabs.svelte +0 -90
- package/components/Tabs/Tabs.svelte.d.ts +0 -25
- package/components/Toast/Toast.svelte +0 -91
- package/components/Toast/Toast.svelte.d.ts +0 -26
- package/components/Toast/ToastContainer.svelte +0 -37
- package/components/Toast/ToastContainer.svelte.d.ts +0 -18
- package/components/Toast/index.js +0 -37
- package/index.d.ts +0 -23
- package/types.d.ts +0 -16
- package/utils.d.ts +0 -16
- package/utils.js +0 -34
- /package/{components → dist/components}/Carousel/index.js +0 -0
- /package/{components → dist/components}/Carousel/types.js +0 -0
- /package/{components → dist/components}/Form/NumberInput/index.d.ts +0 -0
- /package/{components → dist/components}/Form/NumberInput/index.js +0 -0
- /package/{components → dist/components}/Pagination/arrow-dimension.d.ts +0 -0
- /package/{components → dist/components}/Pagination/index.js +0 -0
- /package/{components → dist/components}/Tabs/index.d.ts +0 -0
- /package/{components → dist/components}/Tabs/index.js +0 -0
- /package/{components → dist/components}/Tabs/utils.js +0 -0
- /package/{components → dist/components}/style.scss +0 -0
- /package/{types.js → dist/types.js} +0 -0
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import Input from './Input.svelte';
|
|
2
|
-
import Select from './Select.svelte';
|
|
3
|
-
import Radio from './Radio.svelte';
|
|
4
|
-
import Checkbox from './Checkbox.svelte';
|
|
5
|
-
import Switch from './Switch.svelte';
|
|
6
|
-
import Slider from './Slider.svelte';
|
|
7
|
-
import Form from './Form.svelte';
|
|
8
|
-
import { NumberInput } from './NumberInput';
|
|
9
|
-
export declare type InputType = 'text' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'url' | 'time' | 'date' | 'month' | 'week' | 'datetime-local' | 'color' | 'textarea';
|
|
10
|
-
export { Input, Select, Radio, Checkbox, Switch, Slider, Form, NumberInput, };
|
package/components/Hero.svelte
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
<section {...$$restProps}
|
|
2
|
-
class={classes}
|
|
3
|
-
class:border>
|
|
4
|
-
<div class="hero-body">
|
|
5
|
-
{#if $$slots.title}
|
|
6
|
-
<slot name="title" />
|
|
7
|
-
{:else}
|
|
8
|
-
<h2 class="hero-title">{title}</h2>
|
|
9
|
-
{/if}
|
|
10
|
-
|
|
11
|
-
{#if $$slots.textLead || textLead}
|
|
12
|
-
<p class="hero-text-lead">
|
|
13
|
-
{#if $$slots.textLead}
|
|
14
|
-
<slot name="textLead" />
|
|
15
|
-
{:else}
|
|
16
|
-
{textLead}
|
|
17
|
-
{/if}
|
|
18
|
-
</p>
|
|
19
|
-
{/if}
|
|
20
|
-
|
|
21
|
-
<div><slot /></div>
|
|
22
|
-
</div>
|
|
23
|
-
</section>
|
|
24
|
-
|
|
25
|
-
<script >var _a;
|
|
26
|
-
;
|
|
27
|
-
import { computeClasses } from '../utils';
|
|
28
|
-
export let type = 'primary';
|
|
29
|
-
export let size = 'default';
|
|
30
|
-
export let border = true;
|
|
31
|
-
export let title = '';
|
|
32
|
-
export let textLead = '';
|
|
33
|
-
$: classes = `hero
|
|
34
|
-
${(_a = $$restProps.class) !== null && _a !== void 0 ? _a : ''}
|
|
35
|
-
${computeClasses('hero', { size, type })}`;
|
|
36
|
-
</script>
|
|
37
|
-
|
|
38
|
-
<style >.hero {
|
|
39
|
-
display: flex;
|
|
40
|
-
flex-direction: column;
|
|
41
|
-
justify-content: center;
|
|
42
|
-
padding: 1.5rem 3rem;
|
|
43
|
-
margin-bottom: 20px;
|
|
44
|
-
}
|
|
45
|
-
.hero-title {
|
|
46
|
-
margin-block: 1rem 0.5rem;
|
|
47
|
-
}
|
|
48
|
-
.hero-text-lead {
|
|
49
|
-
font-size: 1.25rem;
|
|
50
|
-
}
|
|
51
|
-
.hero-small {
|
|
52
|
-
padding: 0 1.5rem;
|
|
53
|
-
}
|
|
54
|
-
.hero-large {
|
|
55
|
-
padding: 5rem;
|
|
56
|
-
}
|
|
57
|
-
.hero-fullheight {
|
|
58
|
-
min-height: 100vh;
|
|
59
|
-
}
|
|
60
|
-
.hero-primary {
|
|
61
|
-
background-color: var(--primary-light);
|
|
62
|
-
}
|
|
63
|
-
.hero-secondary {
|
|
64
|
-
background-color: var(--secondary-light);
|
|
65
|
-
}
|
|
66
|
-
.hero-success {
|
|
67
|
-
background-color: var(--success-light);
|
|
68
|
-
}
|
|
69
|
-
.hero-warning {
|
|
70
|
-
background-color: var(--warning-light);
|
|
71
|
-
}
|
|
72
|
-
.hero-danger {
|
|
73
|
-
background-color: var(--danger-light);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:global(.dark .hero-primary) {
|
|
77
|
-
color: var(--primary-text);
|
|
78
|
-
}</style>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { PaperSize, PaperType } from '../types';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
type?: PaperType;
|
|
7
|
-
size?: PaperSize | "fullheight";
|
|
8
|
-
border?: boolean;
|
|
9
|
-
title?: string;
|
|
10
|
-
textLead?: string;
|
|
11
|
-
};
|
|
12
|
-
events: {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
};
|
|
15
|
-
slots: {
|
|
16
|
-
title: {};
|
|
17
|
-
textLead: {};
|
|
18
|
-
default: {};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export declare type HeroProps = typeof __propDef.props;
|
|
22
|
-
export declare type HeroEvents = typeof __propDef.events;
|
|
23
|
-
export declare type HeroSlots = typeof __propDef.slots;
|
|
24
|
-
export default class Hero extends SvelteComponentTyped<HeroProps, HeroEvents, HeroSlots> {
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<svelte:element
|
|
2
|
-
this={as}
|
|
3
|
-
{...$$restProps}
|
|
4
|
-
class={classes}
|
|
5
|
-
class:col-fill={fill}
|
|
6
|
-
class:align-top={top}
|
|
7
|
-
class:align-middle={middle}
|
|
8
|
-
class:align-bottom={bottom}
|
|
9
|
-
>
|
|
10
|
-
<slot />
|
|
11
|
-
</svelte:element>
|
|
12
|
-
|
|
13
|
-
<script >var _a;
|
|
14
|
-
import { computeClasses } from '../../utils';
|
|
15
|
-
export let as = 'div';
|
|
16
|
-
export let col = null;
|
|
17
|
-
export let sm = null;
|
|
18
|
-
export let md = null;
|
|
19
|
-
export let lg = null;
|
|
20
|
-
export let fill = false;
|
|
21
|
-
export let top = false;
|
|
22
|
-
export let middle = false;
|
|
23
|
-
export let bottom = false;
|
|
24
|
-
$: classes = `col ${(_a = $$restProps.class) !== null && _a !== void 0 ? _a : ''} ${computeClasses('col', { col, sm, md, lg })}`;
|
|
25
|
-
</script>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
as?: keyof HTMLElementTagNameMap | keyof SVGElementTagNameMap;
|
|
6
|
-
col?: string | number;
|
|
7
|
-
sm?: string | number;
|
|
8
|
-
md?: string | number;
|
|
9
|
-
lg?: string | number;
|
|
10
|
-
fill?: boolean;
|
|
11
|
-
top?: boolean;
|
|
12
|
-
middle?: boolean;
|
|
13
|
-
bottom?: boolean;
|
|
14
|
-
};
|
|
15
|
-
events: {
|
|
16
|
-
[evt: string]: CustomEvent<any>;
|
|
17
|
-
};
|
|
18
|
-
slots: {
|
|
19
|
-
default: {};
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export declare type ColProps = typeof __propDef.props;
|
|
23
|
-
export declare type ColEvents = typeof __propDef.events;
|
|
24
|
-
export declare type ColSlots = typeof __propDef.slots;
|
|
25
|
-
export default class Col extends SvelteComponentTyped<ColProps, ColEvents, ColSlots> {
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<svelte:element
|
|
2
|
-
this={as}
|
|
3
|
-
{...$$restProps}
|
|
4
|
-
class="{$$restProps.class ?? ''} row"
|
|
5
|
-
class:flex-right={right}
|
|
6
|
-
class:flex-center={center}
|
|
7
|
-
class:flex-edges={edges}
|
|
8
|
-
class:flex-spaces={spaces}
|
|
9
|
-
class:flex-top={top}
|
|
10
|
-
class:flex-middle={middle}
|
|
11
|
-
class:flex-bottom={bottom}
|
|
12
|
-
>
|
|
13
|
-
<slot />
|
|
14
|
-
</svelte:element>
|
|
15
|
-
|
|
16
|
-
<script >export let as = 'div';
|
|
17
|
-
export let right = false;
|
|
18
|
-
export let center = false;
|
|
19
|
-
export let edges = false;
|
|
20
|
-
export let spaces = false;
|
|
21
|
-
export let top = false;
|
|
22
|
-
export let middle = false;
|
|
23
|
-
export let bottom = false;
|
|
24
|
-
</script>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
as?: keyof HTMLElementTagNameMap;
|
|
6
|
-
right?: boolean;
|
|
7
|
-
center?: boolean;
|
|
8
|
-
edges?: boolean;
|
|
9
|
-
spaces?: boolean;
|
|
10
|
-
top?: boolean;
|
|
11
|
-
middle?: boolean;
|
|
12
|
-
bottom?: boolean;
|
|
13
|
-
};
|
|
14
|
-
events: {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
};
|
|
17
|
-
slots: {
|
|
18
|
-
default: {};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export declare type RowProps = typeof __propDef.props;
|
|
22
|
-
export declare type RowEvents = typeof __propDef.events;
|
|
23
|
-
export declare type RowSlots = typeof __propDef.slots;
|
|
24
|
-
export default class Row extends SvelteComponentTyped<RowProps, RowEvents, RowSlots> {
|
|
25
|
-
}
|
|
26
|
-
export {};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<svelte:window on:keydown={handleKeydown} />
|
|
2
|
-
|
|
3
|
-
<div class="modal"
|
|
4
|
-
class:active>
|
|
5
|
-
<div {...$$restProps}
|
|
6
|
-
class="{$$restProps.class ?? ''} modal-body">
|
|
7
|
-
<CloseButton on:click={close} />
|
|
8
|
-
{#if title}
|
|
9
|
-
<h4 class="modal-title">{title}</h4>
|
|
10
|
-
{/if}
|
|
11
|
-
{#if subTitle}
|
|
12
|
-
<h5 class="modal-subtitle">{subTitle}</h5>
|
|
13
|
-
{/if}
|
|
14
|
-
<p class="modal-text">
|
|
15
|
-
{#if content}
|
|
16
|
-
{content}
|
|
17
|
-
{:else if component}
|
|
18
|
-
<svelte:component this={component} />
|
|
19
|
-
{:else}
|
|
20
|
-
<slot />
|
|
21
|
-
{/if}
|
|
22
|
-
</p>
|
|
23
|
-
<footer>
|
|
24
|
-
{#if $$slots.footer}
|
|
25
|
-
<slot name="footer" />
|
|
26
|
-
{/if}
|
|
27
|
-
<Button on:click={close}>
|
|
28
|
-
{closeBtnText}
|
|
29
|
-
</Button>
|
|
30
|
-
</footer>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<script >import { createEventDispatcher, SvelteComponent } from 'svelte';
|
|
35
|
-
import Button from '../Button.svelte';
|
|
36
|
-
import CloseButton from '../CloseButton.svelte';
|
|
37
|
-
export let active = false;
|
|
38
|
-
export let title = '';
|
|
39
|
-
export let subTitle = '';
|
|
40
|
-
export let content = '';
|
|
41
|
-
export let component = null;
|
|
42
|
-
export let closeBtnText = 'Close';
|
|
43
|
-
const dispatch = createEventDispatcher();
|
|
44
|
-
function close() {
|
|
45
|
-
active = false;
|
|
46
|
-
}
|
|
47
|
-
function handleKeydown({ key }) {
|
|
48
|
-
if (key === 'Escape')
|
|
49
|
-
close();
|
|
50
|
-
}
|
|
51
|
-
$: if (!active) {
|
|
52
|
-
dispatch('close');
|
|
53
|
-
}
|
|
54
|
-
</script>
|
|
55
|
-
|
|
56
|
-
<style >.modal.active {
|
|
57
|
-
opacity: 1;
|
|
58
|
-
visibility: visible;
|
|
59
|
-
}
|
|
60
|
-
.modal.active .modal-body {
|
|
61
|
-
top: 50%;
|
|
62
|
-
}</style>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import { SvelteComponent } from 'svelte';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
active?: boolean;
|
|
7
|
-
title?: string;
|
|
8
|
-
subTitle?: string;
|
|
9
|
-
content?: string;
|
|
10
|
-
component?: typeof SvelteComponent;
|
|
11
|
-
closeBtnText?: string;
|
|
12
|
-
};
|
|
13
|
-
events: {
|
|
14
|
-
close: CustomEvent<any>;
|
|
15
|
-
} & {
|
|
16
|
-
[evt: string]: CustomEvent<any>;
|
|
17
|
-
};
|
|
18
|
-
slots: {
|
|
19
|
-
default: {};
|
|
20
|
-
footer: {};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export declare type ModalProps = typeof __propDef.props;
|
|
24
|
-
export declare type ModalEvents = typeof __propDef.events;
|
|
25
|
-
export declare type ModalSlots = typeof __propDef.slots;
|
|
26
|
-
export default class Modal extends SvelteComponentTyped<ModalProps, ModalEvents, ModalSlots> {
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { SvelteComponent } from 'svelte';
|
|
2
|
-
import type { ComponentProps } from '../../utils';
|
|
3
|
-
import Modal from './Modal.svelte';
|
|
4
|
-
declare type ModalProps = ComponentProps<Modal>;
|
|
5
|
-
declare type ProgrammaticModalProps = Omit<ModalProps, 'active'>;
|
|
6
|
-
interface ProgrammaticModal {
|
|
7
|
-
open?: (props: ProgrammaticModalProps) => ProgrammaticModalInstance;
|
|
8
|
-
close?: () => void;
|
|
9
|
-
}
|
|
10
|
-
declare type ProgrammaticModalComponent = ProgrammaticModal & typeof SvelteComponent;
|
|
11
|
-
declare type ProgrammaticModalInstance = ProgrammaticModal & SvelteComponent;
|
|
12
|
-
declare const _default: ProgrammaticModalComponent;
|
|
13
|
-
export default _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import Modal from './Modal.svelte';
|
|
2
|
-
const TRANSITION_TIME = 235;
|
|
3
|
-
function open(props) {
|
|
4
|
-
const modal = new Modal({
|
|
5
|
-
target: document.body,
|
|
6
|
-
props,
|
|
7
|
-
});
|
|
8
|
-
// Preserve transition
|
|
9
|
-
setTimeout(modal.$set.bind(modal, { active: true }), 1);
|
|
10
|
-
modal.close = () => {
|
|
11
|
-
modal.$set({ active: false });
|
|
12
|
-
setTimeout(modal.$destroy, TRANSITION_TIME);
|
|
13
|
-
};
|
|
14
|
-
return modal;
|
|
15
|
-
}
|
|
16
|
-
Modal.open = open;
|
|
17
|
-
export default Modal;
|
package/components/Navbar.svelte
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<nav {...$$restProps}
|
|
2
|
-
class={`${$$restProps.class ?? ''} paper-navbar`}
|
|
3
|
-
class:border class:fixed
|
|
4
|
-
class:split-nav={split}>
|
|
5
|
-
{#if $$slots.brand}
|
|
6
|
-
<div class="nav-brand">
|
|
7
|
-
<slot name="brand" />
|
|
8
|
-
</div>
|
|
9
|
-
{/if}
|
|
10
|
-
<div class="collapsible">
|
|
11
|
-
<button on:click={collapse}>☰</button>
|
|
12
|
-
<div class="collapsible-body" class:open>
|
|
13
|
-
<slot />
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
</nav>
|
|
17
|
-
|
|
18
|
-
<script >export let border = true;
|
|
19
|
-
export let fixed = false;
|
|
20
|
-
export let split = true;
|
|
21
|
-
let open = false;
|
|
22
|
-
function collapse() {
|
|
23
|
-
open = !open;
|
|
24
|
-
}
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<style >/* Papercss removes border of buttons in .collapsible */
|
|
28
|
-
.collapsible > button {
|
|
29
|
-
border: 2px solid var(--primary);
|
|
30
|
-
}
|
|
31
|
-
.collapsible-body.open {
|
|
32
|
-
margin: 0;
|
|
33
|
-
max-height: 960px;
|
|
34
|
-
opacity: 1;
|
|
35
|
-
padding: 0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
:global(.paper-navbar li a.paper-btn) {
|
|
39
|
-
display: initial;
|
|
40
|
-
}</style>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
[x: string]: any;
|
|
5
|
-
border?: boolean;
|
|
6
|
-
fixed?: boolean;
|
|
7
|
-
split?: boolean;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {
|
|
13
|
-
brand: {};
|
|
14
|
-
default: {};
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export declare type NavbarProps = typeof __propDef.props;
|
|
18
|
-
export declare type NavbarEvents = typeof __propDef.events;
|
|
19
|
-
export declare type NavbarSlots = typeof __propDef.slots;
|
|
20
|
-
export default class Navbar extends SvelteComponentTyped<NavbarProps, NavbarEvents, NavbarSlots> {
|
|
21
|
-
}
|
|
22
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor"
|
|
2
|
-
width={dimension} height={dimension} viewBox="0 0 24 24">
|
|
3
|
-
{#if type === 'right'}
|
|
4
|
-
<path d="M5 3l3.057-3 11.943 12-11.943 12-3.057-3 9-9z" />
|
|
5
|
-
{:else}
|
|
6
|
-
<path d="M16.67 0l2.83 2.829-9.339 9.175 9.339 9.167-2.83 2.829-12.17-11.996z" />
|
|
7
|
-
{/if}
|
|
8
|
-
</svg>
|
|
9
|
-
|
|
10
|
-
<script >;
|
|
11
|
-
;
|
|
12
|
-
import arrowDimension from './arrow-dimension';
|
|
13
|
-
export let size;
|
|
14
|
-
export let type;
|
|
15
|
-
let dimension;
|
|
16
|
-
$: dimension = arrowDimension[size];
|
|
17
|
-
</script>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { PaperSize } from '../../types';
|
|
3
|
-
import type { Direction } from '.';
|
|
4
|
-
declare const __propDef: {
|
|
5
|
-
props: {
|
|
6
|
-
size: PaperSize;
|
|
7
|
-
type: Direction;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {};
|
|
13
|
-
};
|
|
14
|
-
export declare type ArrowProps = typeof __propDef.props;
|
|
15
|
-
export declare type ArrowEvents = typeof __propDef.events;
|
|
16
|
-
export declare type ArrowSlots = typeof __propDef.slots;
|
|
17
|
-
export default class Arrow extends SvelteComponentTyped<ArrowProps, ArrowEvents, ArrowSlots> {
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<Button {size} {type}
|
|
2
|
-
isLink {disabled}
|
|
3
|
-
aria-label={ariaLabel}
|
|
4
|
-
on:click={clickHandler}>
|
|
5
|
-
{#if label}
|
|
6
|
-
{label}
|
|
7
|
-
{:else}
|
|
8
|
-
<Arrow {size}
|
|
9
|
-
type={action === 'next' ? 'right' : 'left'} />
|
|
10
|
-
{/if}
|
|
11
|
-
</Button>
|
|
12
|
-
|
|
13
|
-
<script >import Button from '../Button.svelte';
|
|
14
|
-
import Arrow from './Arrow.svelte';
|
|
15
|
-
;
|
|
16
|
-
export let size;
|
|
17
|
-
export let label;
|
|
18
|
-
export let action;
|
|
19
|
-
export let type;
|
|
20
|
-
export let disabled;
|
|
21
|
-
export let clickHandler;
|
|
22
|
-
export let ariaLabel;
|
|
23
|
-
</script>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { PaperSize, PaperType } from '../../types';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
size: PaperSize;
|
|
6
|
-
label: string;
|
|
7
|
-
action: 'previous' | 'next';
|
|
8
|
-
type: PaperType;
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
clickHandler: (e: MouseEvent) => any;
|
|
11
|
-
ariaLabel: string;
|
|
12
|
-
};
|
|
13
|
-
events: {
|
|
14
|
-
[evt: string]: CustomEvent<any>;
|
|
15
|
-
};
|
|
16
|
-
slots: {};
|
|
17
|
-
};
|
|
18
|
-
export declare type NavigationButtonProps = typeof __propDef.props;
|
|
19
|
-
export declare type NavigationButtonEvents = typeof __propDef.events;
|
|
20
|
-
export declare type NavigationButtonSlots = typeof __propDef.slots;
|
|
21
|
-
export default class NavigationButton extends SvelteComponentTyped<NavigationButtonProps, NavigationButtonEvents, NavigationButtonSlots> {
|
|
22
|
-
}
|
|
23
|
-
export {};
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
<section {...$$restProps}>
|
|
2
|
-
{#if showNavigation}
|
|
3
|
-
<NavigationButton
|
|
4
|
-
type={highlightedStyle}
|
|
5
|
-
{size} action="previous"
|
|
6
|
-
label={previousLabel}
|
|
7
|
-
disabled={current <= 1}
|
|
8
|
-
clickHandler={changePage.bind(null, current-1)}
|
|
9
|
-
ariaLabel={ariaPreviousLabel} />
|
|
10
|
-
{/if}
|
|
11
|
-
|
|
12
|
-
{#if simple}
|
|
13
|
-
{current} / {pageCount}
|
|
14
|
-
{:else}
|
|
15
|
-
<ol class="padding-none">
|
|
16
|
-
{#each pages as {idx, show}}
|
|
17
|
-
<li>
|
|
18
|
-
{#if show}
|
|
19
|
-
<Button {size} isLink
|
|
20
|
-
class={bullets ? 'paper-pagination-btn--rounded' : ''}
|
|
21
|
-
on:click={changePage.bind(null, idx)}
|
|
22
|
-
type={idx === current ? highlightedStyle : defaultStyle}
|
|
23
|
-
aria-label={ariaPageLabel?.(idx) ?? `Page ${idx}`}
|
|
24
|
-
aria-current={idx === current}>
|
|
25
|
-
{displayedPageLabel(idx)}
|
|
26
|
-
</Button>
|
|
27
|
-
{:else if shouldDisplayEllipsis(idx)}
|
|
28
|
-
…
|
|
29
|
-
{/if}
|
|
30
|
-
</li>
|
|
31
|
-
{/each}
|
|
32
|
-
</ol>
|
|
33
|
-
{/if}
|
|
34
|
-
|
|
35
|
-
{#if showNavigation}
|
|
36
|
-
<NavigationButton
|
|
37
|
-
type={highlightedStyle}
|
|
38
|
-
{size} action="next"
|
|
39
|
-
label={nextLabel}
|
|
40
|
-
disabled={current >= pageCount}
|
|
41
|
-
clickHandler={changePage.bind(null, current+1)}
|
|
42
|
-
ariaLabel={ariaNextLabel} />
|
|
43
|
-
{/if}
|
|
44
|
-
|
|
45
|
-
{#if jumper}
|
|
46
|
-
<span on:keypress={submitJumper}>
|
|
47
|
-
<Input class="paper-pagination-input"
|
|
48
|
-
bind:value={jumperValue}
|
|
49
|
-
type="number" placeholder="Go to"
|
|
50
|
-
min="1" max={pageCount} step="1" />
|
|
51
|
-
</span>
|
|
52
|
-
{/if}
|
|
53
|
-
</section>
|
|
54
|
-
|
|
55
|
-
<script >import { createEventDispatcher } from 'svelte';
|
|
56
|
-
import Button from '../Button.svelte';
|
|
57
|
-
import Input from '../Form/Input.svelte';
|
|
58
|
-
;
|
|
59
|
-
import NavigationButton from './NavigationButton.svelte';
|
|
60
|
-
export let total;
|
|
61
|
-
export let pageSize = 10;
|
|
62
|
-
export let current = 1;
|
|
63
|
-
export let size = 'small';
|
|
64
|
-
export let navigation = true;
|
|
65
|
-
export let simple = false;
|
|
66
|
-
export let bullets = false;
|
|
67
|
-
export let previousLabel = null;
|
|
68
|
-
export let nextLabel = null;
|
|
69
|
-
export let highlightedStyle = 'secondary';
|
|
70
|
-
export let defaultStyle = null;
|
|
71
|
-
export let rangeBetween = null;
|
|
72
|
-
export let jumper = false;
|
|
73
|
-
export let pageLabel = null;
|
|
74
|
-
export let ariaPreviousLabel = 'previous page';
|
|
75
|
-
export let ariaNextLabel = 'next page';
|
|
76
|
-
export let ariaPageLabel = null;
|
|
77
|
-
const dispatch = createEventDispatcher();
|
|
78
|
-
let jumperValue;
|
|
79
|
-
let pageCount;
|
|
80
|
-
$: pageCount = Math.ceil(total / pageSize);
|
|
81
|
-
let pages;
|
|
82
|
-
$: if (current) {
|
|
83
|
-
pages = Array.from({ length: pageCount }, (_, i) => ({ idx: ++i, show: shouldDisplayButton(i) }));
|
|
84
|
-
}
|
|
85
|
-
let showNavigation;
|
|
86
|
-
$: showNavigation = navigation && !bullets;
|
|
87
|
-
function submitJumper({ code }) {
|
|
88
|
-
const toPage = Number(jumperValue);
|
|
89
|
-
if (code !== 'Enter' || pageInvalid(toPage))
|
|
90
|
-
return;
|
|
91
|
-
changePage(toPage);
|
|
92
|
-
}
|
|
93
|
-
function pageInvalid(idx) {
|
|
94
|
-
return idx < 1 || idx > pageCount || !Number.isInteger(idx);
|
|
95
|
-
}
|
|
96
|
-
function shouldDisplayButton(idx) {
|
|
97
|
-
if (!rangeBetween || [1, pageCount].includes(idx))
|
|
98
|
-
return true;
|
|
99
|
-
return idx >= (current - rangeBetween)
|
|
100
|
-
&& idx <= (current + rangeBetween);
|
|
101
|
-
}
|
|
102
|
-
function shouldDisplayEllipsis(idx) {
|
|
103
|
-
return pages[idx - 2].show;
|
|
104
|
-
}
|
|
105
|
-
function changePage(val) {
|
|
106
|
-
if (pageInvalid(val))
|
|
107
|
-
return;
|
|
108
|
-
current = val;
|
|
109
|
-
dispatch('change', current);
|
|
110
|
-
}
|
|
111
|
-
function displayedPageLabel(idx) {
|
|
112
|
-
var _a;
|
|
113
|
-
if (bullets)
|
|
114
|
-
return '';
|
|
115
|
-
return (_a = pageLabel === null || pageLabel === void 0 ? void 0 : pageLabel(idx)) !== null && _a !== void 0 ? _a : idx;
|
|
116
|
-
}
|
|
117
|
-
</script>
|
|
118
|
-
|
|
119
|
-
<style >ol, li {
|
|
120
|
-
display: inline;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
ol li {
|
|
124
|
-
text-indent: 0;
|
|
125
|
-
}
|
|
126
|
-
ol li::before {
|
|
127
|
-
content: "";
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
:global(.paper-pagination-input) {
|
|
131
|
-
display: inline;
|
|
132
|
-
width: 4rem;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
:global(.paper-pagination-btn--rounded) {
|
|
136
|
-
border-radius: 50%;
|
|
137
|
-
}</style>
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { PaperSize, PaperType } from '../../types';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
total: number;
|
|
7
|
-
pageSize?: number;
|
|
8
|
-
current?: number;
|
|
9
|
-
size?: PaperSize;
|
|
10
|
-
navigation?: boolean;
|
|
11
|
-
simple?: boolean;
|
|
12
|
-
bullets?: boolean;
|
|
13
|
-
previousLabel?: string;
|
|
14
|
-
nextLabel?: string;
|
|
15
|
-
highlightedStyle?: PaperType;
|
|
16
|
-
defaultStyle?: PaperType;
|
|
17
|
-
rangeBetween?: number;
|
|
18
|
-
jumper?: boolean;
|
|
19
|
-
pageLabel?: (idx: number) => string | number;
|
|
20
|
-
ariaPreviousLabel?: string;
|
|
21
|
-
ariaNextLabel?: string;
|
|
22
|
-
ariaPageLabel?: (idx: number) => string;
|
|
23
|
-
};
|
|
24
|
-
events: {
|
|
25
|
-
change: CustomEvent<any>;
|
|
26
|
-
} & {
|
|
27
|
-
[evt: string]: CustomEvent<any>;
|
|
28
|
-
};
|
|
29
|
-
slots: {};
|
|
30
|
-
};
|
|
31
|
-
export declare type PaginationProps = typeof __propDef.props;
|
|
32
|
-
export declare type PaginationEvents = typeof __propDef.events;
|
|
33
|
-
export declare type PaginationSlots = typeof __propDef.slots;
|
|
34
|
-
export default class Pagination extends SvelteComponentTyped<PaginationProps, PaginationEvents, PaginationSlots> {
|
|
35
|
-
}
|
|
36
|
-
export {};
|