spaper 0.2.4 → 0.2.5
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 +30 -0
- package/components/Alert.svelte +7 -5
- package/components/Alert.svelte.d.ts +3 -1
- package/components/Card.svelte +2 -1
- package/components/Card.svelte.d.ts +2 -1
- package/components/CloseButton.svelte +23 -0
- package/components/CloseButton.svelte.d.ts +19 -0
- package/components/Form/Form.svelte +4 -0
- package/components/Form/Form.svelte.d.ts +20 -0
- package/components/Form/index.d.ts +2 -1
- package/components/Form/index.js +2 -1
- package/components/Modal/Modal.svelte +3 -13
- package/components/Popover.svelte.d.ts +2 -2
- package/components/Tabs/Tabs.svelte +11 -0
- package/components/Toast/Toast.svelte +78 -0
- package/components/Toast/Toast.svelte.d.ts +26 -0
- package/components/Toast/ToastContainer.svelte +37 -0
- package/components/Toast/ToastContainer.svelte.d.ts +18 -0
- package/components/Toast/index.d.ts +32 -0
- package/components/Toast/index.js +37 -0
- package/index.d.ts +3 -2
- package/index.js +3 -2
- package/package.json +7 -2
- package/types.d.ts +4 -0
package/README.md
CHANGED
|
@@ -48,3 +48,33 @@ npm i spaper
|
|
|
48
48
|
<Alert>...</Alert>
|
|
49
49
|
<Button>Click me</Button>
|
|
50
50
|
```
|
|
51
|
+
|
|
52
|
+
<hr />
|
|
53
|
+
|
|
54
|
+
#### Components
|
|
55
|
+
|
|
56
|
+
- Alert
|
|
57
|
+
- Article
|
|
58
|
+
- Badge
|
|
59
|
+
- Breadcrumb
|
|
60
|
+
- Button
|
|
61
|
+
- Card
|
|
62
|
+
- Collapsible
|
|
63
|
+
- Checkbox
|
|
64
|
+
- Input
|
|
65
|
+
- Radio
|
|
66
|
+
- Select
|
|
67
|
+
- Slider
|
|
68
|
+
- Switch
|
|
69
|
+
- Modal
|
|
70
|
+
- Navbar
|
|
71
|
+
- Pagination
|
|
72
|
+
- Popover
|
|
73
|
+
- Progress
|
|
74
|
+
- Table
|
|
75
|
+
- Tabs
|
|
76
|
+
|
|
77
|
+
##### Coming soon:
|
|
78
|
+
- Form
|
|
79
|
+
- Toast
|
|
80
|
+
- Step
|
package/components/Alert.svelte
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
<div
|
|
1
|
+
<div {...$$restProps}
|
|
2
|
+
class={classes}
|
|
2
3
|
class:closed class:dismissible
|
|
3
4
|
role="alert">
|
|
4
5
|
<slot />
|
|
5
6
|
{#if dismissible}
|
|
6
|
-
<
|
|
7
|
+
<CloseButton on:click={close} />
|
|
7
8
|
{/if}
|
|
8
9
|
</div>
|
|
9
10
|
|
|
10
|
-
<script lang="ts"
|
|
11
|
+
<script lang="ts">var _a;
|
|
12
|
+
;
|
|
13
|
+
import CloseButton from './CloseButton.svelte';
|
|
11
14
|
import { computeClasses } from '../utils';
|
|
12
15
|
export let type = 'primary';
|
|
13
16
|
export let dismissible = false;
|
|
@@ -15,8 +18,7 @@ let closed = false;
|
|
|
15
18
|
function close() {
|
|
16
19
|
closed = true;
|
|
17
20
|
}
|
|
18
|
-
|
|
19
|
-
$: classes = `alert ${computeClasses('alert', { type })}`;
|
|
21
|
+
$: classes = `${(_a = $$restProps.class) !== null && _a !== void 0 ? _a : ''} alert ${computeClasses('alert', { type })}`;
|
|
20
22
|
</script>
|
|
21
23
|
|
|
22
24
|
<style lang="scss">.alert {
|
package/components/Card.svelte
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { PositionY } from "../types";
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
5
|
title?: string;
|
|
5
6
|
subTitle?: string;
|
|
6
7
|
image?: string;
|
|
7
8
|
imageAlt?: string;
|
|
8
|
-
imagePlacement?:
|
|
9
|
+
imagePlacement?: PositionY;
|
|
9
10
|
header?: string;
|
|
10
11
|
footer?: string;
|
|
11
12
|
width?: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<button {...$$restProps}
|
|
2
|
+
class="{$$restProps.class ?? ''} btn-close"
|
|
3
|
+
aria-label={ariaLabel}
|
|
4
|
+
on:click>
|
|
5
|
+
X
|
|
6
|
+
</button>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">export let ariaLabel = 'close';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<style lang="scss">button {
|
|
12
|
+
float: right;
|
|
13
|
+
border: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
background: none;
|
|
16
|
+
box-shadow: none;
|
|
17
|
+
transform: none;
|
|
18
|
+
}
|
|
19
|
+
button:hover, button:focus {
|
|
20
|
+
transform: none;
|
|
21
|
+
box-shadow: none;
|
|
22
|
+
border: 0;
|
|
23
|
+
}</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
ariaLabel?: string;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
click: MouseEvent;
|
|
9
|
+
} & {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
};
|
|
14
|
+
export declare type CloseButtonProps = typeof __propDef.props;
|
|
15
|
+
export declare type CloseButtonEvents = typeof __propDef.events;
|
|
16
|
+
export declare type CloseButtonSlots = typeof __propDef.slots;
|
|
17
|
+
export default class CloseButton extends SvelteComponentTyped<CloseButtonProps, CloseButtonEvents, CloseButtonSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} FormProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} FormEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} FormSlots */
|
|
4
|
+
export default class Form {
|
|
5
|
+
}
|
|
6
|
+
export type FormProps = typeof __propDef.props;
|
|
7
|
+
export type FormEvents = typeof __propDef.events;
|
|
8
|
+
export type FormSlots = typeof __propDef.slots;
|
|
9
|
+
declare const __propDef: {
|
|
10
|
+
props: {
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
};
|
|
13
|
+
events: {
|
|
14
|
+
[evt: string]: CustomEvent<any>;
|
|
15
|
+
};
|
|
16
|
+
slots: {
|
|
17
|
+
default: {};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -4,5 +4,6 @@ import Radio from './Radio.svelte';
|
|
|
4
4
|
import Checkbox from './Checkbox.svelte';
|
|
5
5
|
import Switch from './Switch.svelte';
|
|
6
6
|
import Slider from './Slider.svelte';
|
|
7
|
+
import Form from './Form.svelte';
|
|
7
8
|
export declare type InputType = 'text' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'url' | 'time' | 'date' | 'month' | 'week' | 'datetime-local' | 'color' | 'textarea';
|
|
8
|
-
export { Input, Select, Radio, Checkbox, Switch, Slider, };
|
|
9
|
+
export { Input, Select, Radio, Checkbox, Switch, Slider, Form, };
|
package/components/Form/index.js
CHANGED
|
@@ -4,4 +4,5 @@ import Radio from './Radio.svelte';
|
|
|
4
4
|
import Checkbox from './Checkbox.svelte';
|
|
5
5
|
import Switch from './Switch.svelte';
|
|
6
6
|
import Slider from './Slider.svelte';
|
|
7
|
-
|
|
7
|
+
import Form from './Form.svelte';
|
|
8
|
+
export { Input, Select, Radio, Checkbox, Switch, Slider, Form, };
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<div class="modal" class:active>
|
|
4
4
|
<div class="modal-body">
|
|
5
|
-
<
|
|
6
|
-
on:click={close}>
|
|
7
|
-
X
|
|
8
|
-
</button>
|
|
5
|
+
<CloseButton on:click={close} />
|
|
9
6
|
{#if title}
|
|
10
7
|
<h4 class="modal-title">{title}</h4>
|
|
11
8
|
{/if}
|
|
@@ -27,6 +24,7 @@
|
|
|
27
24
|
</div>
|
|
28
25
|
|
|
29
26
|
<script lang="ts">import Button from '../Button.svelte';
|
|
27
|
+
import CloseButton from '../CloseButton.svelte';
|
|
30
28
|
export let active = false;
|
|
31
29
|
export let title = '';
|
|
32
30
|
export let subTitle = '';
|
|
@@ -40,15 +38,7 @@ function handleKeydown({ key }) {
|
|
|
40
38
|
}
|
|
41
39
|
</script>
|
|
42
40
|
|
|
43
|
-
<style lang="scss">.
|
|
44
|
-
border: 0;
|
|
45
|
-
}
|
|
46
|
-
.btn-close:hover {
|
|
47
|
-
box-shadow: none;
|
|
48
|
-
transform: none;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.modal.active {
|
|
41
|
+
<style lang="scss">.modal.active {
|
|
52
42
|
opacity: 1;
|
|
53
43
|
visibility: visible;
|
|
54
44
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { PaperType } from "../types";
|
|
2
|
+
import type { PaperType, Position } from "../types";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
[x: string]: any;
|
|
6
6
|
label?: string;
|
|
7
|
-
position?:
|
|
7
|
+
position?: Position;
|
|
8
8
|
inline?: boolean;
|
|
9
9
|
background?: PaperType;
|
|
10
10
|
active?: boolean;
|
|
@@ -67,4 +67,15 @@ $: activeTab && updateTabsVisility();
|
|
|
67
67
|
.tabs-label-header--active {
|
|
68
68
|
color: var(--primary);
|
|
69
69
|
border-bottom: 3px solid var(--secondary);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
:global(.tabs input) {
|
|
73
|
+
display: block;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:global(.tabs label) {
|
|
77
|
+
all: inherit;
|
|
78
|
+
}
|
|
79
|
+
:global(.tabs label):hover {
|
|
80
|
+
all: inherit;
|
|
70
81
|
}</style>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{#if active}
|
|
2
|
+
<div class={classes}
|
|
3
|
+
bind:this={toastElement}
|
|
4
|
+
on:mouseenter={pause}
|
|
5
|
+
on:mouseleave={dismiss}
|
|
6
|
+
in:fly={{ y: position.includes('top') ? -100 : 100 }}
|
|
7
|
+
out:fade={{ duration: 300 }}
|
|
8
|
+
role="alert">
|
|
9
|
+
{@html message}
|
|
10
|
+
{#if dismissible||indefinite}
|
|
11
|
+
<CloseButton ariaLabel={closeAriaLabel}
|
|
12
|
+
on:click={close} />
|
|
13
|
+
{/if}
|
|
14
|
+
</div>
|
|
15
|
+
{/if}
|
|
16
|
+
|
|
17
|
+
<script lang="ts">import { onMount } from 'svelte';
|
|
18
|
+
import { fly, fade } from 'svelte/transition';
|
|
19
|
+
;
|
|
20
|
+
;
|
|
21
|
+
import { computeClasses } from '../../utils';
|
|
22
|
+
import ToastContainer, { containerClass } from './ToastContainer.svelte';
|
|
23
|
+
import CloseButton from '../CloseButton.svelte';
|
|
24
|
+
export let message;
|
|
25
|
+
export let type = 'primary';
|
|
26
|
+
export let duration = 2000;
|
|
27
|
+
export let position = 'top-right';
|
|
28
|
+
export let pauseOnHover = false;
|
|
29
|
+
export let dismissible = false;
|
|
30
|
+
export let indefinite = false;
|
|
31
|
+
export let closeAriaLabel = 'close';
|
|
32
|
+
export let onClose = null;
|
|
33
|
+
let active = true;
|
|
34
|
+
let toastElement;
|
|
35
|
+
let timeoutId;
|
|
36
|
+
$: containerSelector = `.${containerClass}.${position}`;
|
|
37
|
+
$: classes = `alert margin-small shadow ${computeClasses('alert', { type })}`;
|
|
38
|
+
onMount(() => {
|
|
39
|
+
insert();
|
|
40
|
+
if (!indefinite) {
|
|
41
|
+
timeoutId = window.setTimeout(close, duration);
|
|
42
|
+
}
|
|
43
|
+
if (timeoutId) {
|
|
44
|
+
return () => clearTimeout(timeoutId);
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
function pause() {
|
|
48
|
+
if (!pauseOnHover || indefinite)
|
|
49
|
+
return;
|
|
50
|
+
clearTimeout(timeoutId);
|
|
51
|
+
}
|
|
52
|
+
function dismiss() {
|
|
53
|
+
if (!pauseOnHover || indefinite)
|
|
54
|
+
return;
|
|
55
|
+
close();
|
|
56
|
+
}
|
|
57
|
+
function close() {
|
|
58
|
+
active = false;
|
|
59
|
+
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
60
|
+
}
|
|
61
|
+
function setupContainer() {
|
|
62
|
+
new ToastContainer({
|
|
63
|
+
target: document.body,
|
|
64
|
+
props: { position },
|
|
65
|
+
});
|
|
66
|
+
return document.querySelector(containerSelector);
|
|
67
|
+
}
|
|
68
|
+
function insert() {
|
|
69
|
+
const container = document.querySelector(containerSelector) || setupContainer();
|
|
70
|
+
container.insertAdjacentElement('afterbegin', toastElement);
|
|
71
|
+
}
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<style>
|
|
75
|
+
div {
|
|
76
|
+
width: 250px;
|
|
77
|
+
}
|
|
78
|
+
</style>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { PaperType } from '../../types';
|
|
3
|
+
import type { ToastPosition } from './';
|
|
4
|
+
declare const __propDef: {
|
|
5
|
+
props: {
|
|
6
|
+
message: string;
|
|
7
|
+
type?: PaperType;
|
|
8
|
+
duration?: number;
|
|
9
|
+
position?: ToastPosition;
|
|
10
|
+
pauseOnHover?: boolean;
|
|
11
|
+
dismissible?: boolean;
|
|
12
|
+
indefinite?: boolean;
|
|
13
|
+
closeAriaLabel?: string;
|
|
14
|
+
onClose?: Function;
|
|
15
|
+
};
|
|
16
|
+
events: {
|
|
17
|
+
[evt: string]: CustomEvent<any>;
|
|
18
|
+
};
|
|
19
|
+
slots: {};
|
|
20
|
+
};
|
|
21
|
+
export declare type ToastProps = typeof __propDef.props;
|
|
22
|
+
export declare type ToastEvents = typeof __propDef.events;
|
|
23
|
+
export declare type ToastSlots = typeof __propDef.slots;
|
|
24
|
+
export default class Toast extends SvelteComponentTyped<ToastProps, ToastEvents, ToastSlots> {
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<div class="{containerClass} {position}">
|
|
2
|
+
</div>
|
|
3
|
+
|
|
4
|
+
<script lang="ts" context="module">export const containerClass = 'paper-toast-container';
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<script lang="ts">;
|
|
8
|
+
export let position = 'top-right';
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<style lang="scss">:global(.paper-toast-container:is(.top, .bottom) > div) {
|
|
12
|
+
align-self: center;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:global(.paper-toast-container:is([class*=right]) > div) {
|
|
16
|
+
align-self: end;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
div {
|
|
20
|
+
position: fixed;
|
|
21
|
+
display: flex;
|
|
22
|
+
width: 100%;
|
|
23
|
+
padding: 2em;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
z-index: 9999;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
}
|
|
28
|
+
div[class*=top] {
|
|
29
|
+
top: 0;
|
|
30
|
+
}
|
|
31
|
+
div[class*=bottom] {
|
|
32
|
+
bottom: 0;
|
|
33
|
+
flex-direction: column-reverse;
|
|
34
|
+
}
|
|
35
|
+
div[class*=left] {
|
|
36
|
+
left: 0;
|
|
37
|
+
}</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
export declare const containerClass = "paper-toast-container";
|
|
3
|
+
import type { ToastPosition } from './';
|
|
4
|
+
declare const __propDef: {
|
|
5
|
+
props: {
|
|
6
|
+
position?: ToastPosition;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export declare type ToastContainerProps = typeof __propDef.props;
|
|
14
|
+
export declare type ToastContainerEvents = typeof __propDef.events;
|
|
15
|
+
export declare type ToastContainerSlots = typeof __propDef.slots;
|
|
16
|
+
export default class ToastContainer extends SvelteComponentTyped<ToastContainerProps, ToastContainerEvents, ToastContainerSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { PaperType, PositionY } from '../../types';
|
|
2
|
+
export declare type ToastPosition = PositionY | 'top-right' | 'bottom-right' | 'bottom-left' | 'top-left';
|
|
3
|
+
interface ToastProps {
|
|
4
|
+
message: string;
|
|
5
|
+
type?: PaperType;
|
|
6
|
+
duration?: number;
|
|
7
|
+
position?: ToastPosition;
|
|
8
|
+
pauseOnHover?: boolean;
|
|
9
|
+
dismissible?: boolean;
|
|
10
|
+
indefinite?: boolean;
|
|
11
|
+
closeAriaLabel?: string;
|
|
12
|
+
onClose?: Function;
|
|
13
|
+
}
|
|
14
|
+
interface ToastMethods {
|
|
15
|
+
open: (props: ToastProps | string) => void;
|
|
16
|
+
info: (options: OpenWithTypeParams | string) => void;
|
|
17
|
+
success: (options: OpenWithTypeParams | string) => void;
|
|
18
|
+
warning: (options: OpenWithTypeParams | string) => void;
|
|
19
|
+
warn: (options: OpenWithTypeParams | string) => void;
|
|
20
|
+
danger: (options: OpenWithTypeParams | string) => void;
|
|
21
|
+
error: (options: OpenWithTypeParams | string) => void;
|
|
22
|
+
}
|
|
23
|
+
declare type OpenWithTypeParams = Omit<ToastProps, 'type'>;
|
|
24
|
+
export declare function open(props: ToastProps | string): void;
|
|
25
|
+
export declare const info: (options: OpenWithTypeParams | string) => void;
|
|
26
|
+
export declare const success: (options: OpenWithTypeParams | string) => void;
|
|
27
|
+
export declare const warning: (options: OpenWithTypeParams | string) => void;
|
|
28
|
+
export declare const warn: (options: OpenWithTypeParams | string) => void;
|
|
29
|
+
export declare const danger: (options: OpenWithTypeParams | string) => void;
|
|
30
|
+
export declare const error: (options: OpenWithTypeParams | string) => void;
|
|
31
|
+
declare const _default: ToastMethods;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import Toast from './Toast.svelte';
|
|
2
|
+
export function open(props) {
|
|
3
|
+
if (typeof props === 'string')
|
|
4
|
+
props = { message: props };
|
|
5
|
+
new Toast({
|
|
6
|
+
target: document.body,
|
|
7
|
+
props,
|
|
8
|
+
intro: true,
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function openType(type) {
|
|
12
|
+
return (options) => {
|
|
13
|
+
const props = {
|
|
14
|
+
type,
|
|
15
|
+
message: '',
|
|
16
|
+
};
|
|
17
|
+
if (typeof options === 'string')
|
|
18
|
+
props.message = options;
|
|
19
|
+
else
|
|
20
|
+
Object.assign(props, options);
|
|
21
|
+
new Toast({
|
|
22
|
+
target: document.body,
|
|
23
|
+
props,
|
|
24
|
+
intro: true,
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export const info = openType('secondary');
|
|
29
|
+
export const success = openType('success');
|
|
30
|
+
export const warning = openType('warning');
|
|
31
|
+
export const warn = warning;
|
|
32
|
+
export const danger = openType('danger');
|
|
33
|
+
export const error = danger;
|
|
34
|
+
Object.assign(Toast, {
|
|
35
|
+
open, info, success, warning, warn, danger
|
|
36
|
+
});
|
|
37
|
+
export default Toast;
|
package/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import Breadcrumb from './components/Breadcrumb.svelte';
|
|
|
5
5
|
import Navbar from './components/Navbar.svelte';
|
|
6
6
|
import Modal from './components/Modal';
|
|
7
7
|
import { Tabs, Tab } from './components/Tabs';
|
|
8
|
-
import { Input, Select, Radio, Checkbox, Switch, Slider } from './components/Form';
|
|
8
|
+
import { Input, Select, Radio, Checkbox, Switch, Slider, Form } from './components/Form';
|
|
9
9
|
import Article from './components/Article.svelte';
|
|
10
10
|
import Card from './components/Card.svelte';
|
|
11
11
|
import Collapsible from './components/Collapsible.svelte';
|
|
@@ -13,4 +13,5 @@ import Popover from './components/Popover.svelte';
|
|
|
13
13
|
import Progress from './components/Progress.svelte';
|
|
14
14
|
import Table from './components/Table.svelte';
|
|
15
15
|
import Pagination from './components/Pagination';
|
|
16
|
-
|
|
16
|
+
import Toast from './components/Toast';
|
|
17
|
+
export { Button, Alert, Badge, Breadcrumb, Navbar, Modal, Tabs, Tab, Form, Input, Select, Radio, Checkbox, Switch, Slider, Article, Card, Collapsible, Popover, Progress, Table, Pagination, Toast, };
|
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import Breadcrumb from './components/Breadcrumb.svelte';
|
|
|
5
5
|
import Navbar from './components/Navbar.svelte';
|
|
6
6
|
import Modal from './components/Modal';
|
|
7
7
|
import { Tabs, Tab } from './components/Tabs';
|
|
8
|
-
import { Input, Select, Radio, Checkbox, Switch, Slider } from './components/Form';
|
|
8
|
+
import { Input, Select, Radio, Checkbox, Switch, Slider, Form } from './components/Form';
|
|
9
9
|
import Article from './components/Article.svelte';
|
|
10
10
|
import Card from './components/Card.svelte';
|
|
11
11
|
import Collapsible from './components/Collapsible.svelte';
|
|
@@ -13,4 +13,5 @@ import Popover from './components/Popover.svelte';
|
|
|
13
13
|
import Progress from './components/Progress.svelte';
|
|
14
14
|
import Table from './components/Table.svelte';
|
|
15
15
|
import Pagination from './components/Pagination';
|
|
16
|
-
|
|
16
|
+
import Toast from './components/Toast';
|
|
17
|
+
export { Button, Alert, Badge, Breadcrumb, Navbar, Modal, Tabs, Tab, Form, Input, Select, Radio, Checkbox, Switch, Slider, Article, Card, Collapsible, Popover, Progress, Table, Pagination, Toast, };
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"papercss",
|
|
9
9
|
"components"
|
|
10
10
|
],
|
|
11
|
-
"version": "0.2.
|
|
11
|
+
"version": "0.2.5",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "git+https://github.com/Oli8/spaper.git"
|
|
@@ -33,8 +33,10 @@
|
|
|
33
33
|
"./components/Breadcrumb.svelte": "./components/Breadcrumb.svelte",
|
|
34
34
|
"./components/Button.svelte": "./components/Button.svelte",
|
|
35
35
|
"./components/Card.svelte": "./components/Card.svelte",
|
|
36
|
+
"./components/CloseButton.svelte": "./components/CloseButton.svelte",
|
|
36
37
|
"./components/Collapsible.svelte": "./components/Collapsible.svelte",
|
|
37
38
|
"./components/Form/Checkbox.svelte": "./components/Form/Checkbox.svelte",
|
|
39
|
+
"./components/Form/Form.svelte": "./components/Form/Form.svelte",
|
|
38
40
|
"./components/Form/Input.svelte": "./components/Form/Input.svelte",
|
|
39
41
|
"./components/Form/Radio.svelte": "./components/Form/Radio.svelte",
|
|
40
42
|
"./components/Form/Select.svelte": "./components/Form/Select.svelte",
|
|
@@ -56,8 +58,11 @@
|
|
|
56
58
|
"./components/Tabs/Tab.svelte": "./components/Tabs/Tab.svelte",
|
|
57
59
|
"./components/Tabs/Tabs.svelte": "./components/Tabs/Tabs.svelte",
|
|
58
60
|
"./components/Tabs": "./components/Tabs/index.js",
|
|
61
|
+
"./components/Toast/Toast.svelte": "./components/Toast/Toast.svelte",
|
|
62
|
+
"./components/Toast/ToastContainer.svelte": "./components/Toast/ToastContainer.svelte",
|
|
63
|
+
"./components/Toast": "./components/Toast/index.js",
|
|
59
64
|
"./components/style.scss": "./components/style.scss",
|
|
60
65
|
".": "./index.js",
|
|
61
66
|
"./utils.js": "./utils.js"
|
|
62
67
|
}
|
|
63
|
-
}
|
|
68
|
+
}
|
package/types.d.ts
CHANGED
|
@@ -7,3 +7,7 @@ export type PaperFlexPlacement = 'spaces' | 'edges' | 'right' | 'center' | 'left
|
|
|
7
7
|
export type PaperAlign = 'left' | 'center' | 'right';
|
|
8
8
|
|
|
9
9
|
export type Attributes = Record<string, string|boolean>;
|
|
10
|
+
|
|
11
|
+
export type PositionY = 'top' | 'bottom';
|
|
12
|
+
export type PositionX = 'left' | 'right';
|
|
13
|
+
export type Position = PositionX | PositionY;
|