sveltacular 0.0.1
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 +11 -0
- package/dist/forms/button/button.stories.svelte +33 -0
- package/dist/forms/button/button.stories.svelte.d.ts +14 -0
- package/dist/forms/button/button.svelte +129 -0
- package/dist/forms/button/button.svelte.d.ts +26 -0
- package/dist/forms/check-box/check-box.stories.svelte +13 -0
- package/dist/forms/check-box/check-box.stories.svelte.d.ts +14 -0
- package/dist/forms/check-box/check-box.svelte +26 -0
- package/dist/forms/check-box/check-box.svelte.d.ts +21 -0
- package/dist/forms/check-box/check-input.svelte +32 -0
- package/dist/forms/check-box/check-input.svelte.d.ts +20 -0
- package/dist/forms/date-box/date-box.stories.svelte +17 -0
- package/dist/forms/date-box/date-box.stories.svelte.d.ts +14 -0
- package/dist/forms/date-box/date-box.svelte +68 -0
- package/dist/forms/date-box/date-box.svelte.d.ts +23 -0
- package/dist/forms/dropdown-box/dropdown-box.stories.svelte +15 -0
- package/dist/forms/dropdown-box/dropdown-box.stories.svelte.d.ts +14 -0
- package/dist/forms/dropdown-box/dropdown-box.svelte +36 -0
- package/dist/forms/dropdown-box/dropdown-box.svelte.d.ts +25 -0
- package/dist/forms/form-field.svelte +22 -0
- package/dist/forms/form-field.svelte.d.ts +19 -0
- package/dist/forms/form-label.svelte +14 -0
- package/dist/forms/form-label.svelte.d.ts +19 -0
- package/dist/forms/form.svelte +12 -0
- package/dist/forms/form.svelte.d.ts +20 -0
- package/dist/forms/number-box/number-box.stories.svelte +21 -0
- package/dist/forms/number-box/number-box.stories.svelte.d.ts +14 -0
- package/dist/forms/number-box/number-box.svelte +83 -0
- package/dist/forms/number-box/number-box.svelte.d.ts +28 -0
- package/dist/forms/switch/switch.stories.svelte +13 -0
- package/dist/forms/switch/switch.stories.svelte.d.ts +14 -0
- package/dist/forms/switch/switch.svelte +73 -0
- package/dist/forms/switch/switch.svelte.d.ts +20 -0
- package/dist/forms/text-area/text-area.stories.svelte +13 -0
- package/dist/forms/text-area/text-area.stories.svelte.d.ts +14 -0
- package/dist/forms/text-area/text-area.svelte +34 -0
- package/dist/forms/text-area/text-area.svelte.d.ts +25 -0
- package/dist/forms/text-box/text-box.stories.svelte +17 -0
- package/dist/forms/text-box/text-box.stories.svelte.d.ts +14 -0
- package/dist/forms/text-box/text-box.svelte +83 -0
- package/dist/forms/text-box/text-box.svelte.d.ts +30 -0
- package/dist/forms/upload-dropzone/upload-dropzone.stories.svelte +11 -0
- package/dist/forms/upload-dropzone/upload-dropzone.stories.svelte.d.ts +14 -0
- package/dist/forms/upload-dropzone/upload-dropzone.svelte +82 -0
- package/dist/forms/upload-dropzone/upload-dropzone.svelte.d.ts +18 -0
- package/dist/generic/card/card.stories.svelte +9 -0
- package/dist/generic/card/card.stories.svelte.d.ts +14 -0
- package/dist/generic/card/card.svelte +39 -0
- package/dist/generic/card/card.svelte.d.ts +19 -0
- package/dist/generic/divider/divider.stories.svelte +9 -0
- package/dist/generic/divider/divider.stories.svelte.d.ts +14 -0
- package/dist/generic/divider/divider.svelte +10 -0
- package/dist/generic/divider/divider.svelte.d.ts +23 -0
- package/dist/generic/link/link.stories.svelte +21 -0
- package/dist/generic/link/link.stories.svelte.d.ts +14 -0
- package/dist/generic/link/link.svelte +41 -0
- package/dist/generic/link/link.svelte.d.ts +22 -0
- package/dist/generic/overlay.svelte +24 -0
- package/dist/generic/overlay.svelte.d.ts +27 -0
- package/dist/generic/pill/pill.stories.svelte +29 -0
- package/dist/generic/pill/pill.stories.svelte.d.ts +14 -0
- package/dist/generic/pill/pill.svelte +35 -0
- package/dist/generic/pill/pill.svelte.d.ts +20 -0
- package/dist/generic/scorecard/scorecard.stories.svelte +9 -0
- package/dist/generic/scorecard/scorecard.stories.svelte.d.ts +14 -0
- package/dist/generic/scorecard/scorecard.svelte +28 -0
- package/dist/generic/scorecard/scorecard.svelte.d.ts +18 -0
- package/dist/icons/angle-right-icon.svelte +12 -0
- package/dist/icons/angle-right-icon.svelte.d.ts +14 -0
- package/dist/icons/angle-up-icon.svelte +9 -0
- package/dist/icons/angle-up-icon.svelte.d.ts +23 -0
- package/dist/icons/home-icon.svelte +8 -0
- package/dist/icons/home-icon.svelte.d.ts +14 -0
- package/dist/icons/svg-icon.svelte +16 -0
- package/dist/icons/svg-icon.svelte.d.ts +24 -0
- package/dist/icons/upload-icon.svelte +9 -0
- package/dist/icons/upload-icon.svelte.d.ts +23 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.js +2 -0
- package/dist/layout/flex-col.svelte +14 -0
- package/dist/layout/flex-col.svelte.d.ts +20 -0
- package/dist/layout/flex-item.svelte +7 -0
- package/dist/layout/flex-item.svelte.d.ts +27 -0
- package/dist/layout/flex-row.svelte +33 -0
- package/dist/layout/flex-row.svelte.d.ts +20 -0
- package/dist/modals/alert.stories.svelte +19 -0
- package/dist/modals/alert.stories.svelte.d.ts +14 -0
- package/dist/modals/alert.svelte +44 -0
- package/dist/modals/alert.svelte.d.ts +23 -0
- package/dist/modals/confirm.stories.svelte +9 -0
- package/dist/modals/confirm.stories.svelte.d.ts +14 -0
- package/dist/modals/confirm.svelte +57 -0
- package/dist/modals/confirm.svelte.d.ts +27 -0
- package/dist/modals/dialog-body.svelte +9 -0
- package/dist/modals/dialog-body.svelte.d.ts +27 -0
- package/dist/modals/dialog-footer.svelte +19 -0
- package/dist/modals/dialog-footer.svelte.d.ts +27 -0
- package/dist/modals/dialog-header.svelte +38 -0
- package/dist/modals/dialog-header.svelte.d.ts +20 -0
- package/dist/modals/dialog-window.svelte +33 -0
- package/dist/modals/dialog-window.svelte.d.ts +19 -0
- package/dist/modals/prompt.stories.svelte +9 -0
- package/dist/modals/prompt.stories.svelte.d.ts +14 -0
- package/dist/modals/prompt.svelte +66 -0
- package/dist/modals/prompt.svelte.d.ts +30 -0
- package/dist/navigation/accordian/accordian.stories.svelte +18 -0
- package/dist/navigation/accordian/accordian.stories.svelte.d.ts +14 -0
- package/dist/navigation/accordian/accordian.svelte +62 -0
- package/dist/navigation/accordian/accordian.svelte.d.ts +19 -0
- package/dist/navigation/app-bar/app-bar.stories.svelte +21 -0
- package/dist/navigation/app-bar/app-bar.stories.svelte.d.ts +14 -0
- package/dist/navigation/app-bar/app-bar.svelte +53 -0
- package/dist/navigation/app-bar/app-bar.svelte.d.ts +22 -0
- package/dist/navigation/breadcrumbs/breadcrumbs.stories.svelte +16 -0
- package/dist/navigation/breadcrumbs/breadcrumbs.stories.svelte.d.ts +14 -0
- package/dist/navigation/breadcrumbs/breadcrumbs.svelte +56 -0
- package/dist/navigation/breadcrumbs/breadcrumbs.svelte.d.ts +20 -0
- package/dist/navigation/side-bar/side-bar.stories.svelte +19 -0
- package/dist/navigation/side-bar/side-bar.stories.svelte.d.ts +14 -0
- package/dist/navigation/side-bar/side-bar.svelte +33 -0
- package/dist/navigation/side-bar/side-bar.svelte.d.ts +18 -0
- package/dist/navigation/tabs/tab-group.svelte +20 -0
- package/dist/navigation/tabs/tab-group.svelte.d.ts +21 -0
- package/dist/navigation/tabs/tab.svelte +87 -0
- package/dist/navigation/tabs/tab.svelte.d.ts +21 -0
- package/dist/navigation/tabs/tabs.stories.svelte +20 -0
- package/dist/navigation/tabs/tabs.stories.svelte.d.ts +14 -0
- package/dist/tables/data-grid.stories.svelte +40 -0
- package/dist/tables/data-grid.stories.svelte.d.ts +14 -0
- package/dist/tables/data-grid.svelte +43 -0
- package/dist/tables/data-grid.svelte.d.ts +18 -0
- package/dist/tables/table-body.svelte +3 -0
- package/dist/tables/table-body.svelte.d.ts +27 -0
- package/dist/tables/table-cell.svelte +13 -0
- package/dist/tables/table-cell.svelte.d.ts +18 -0
- package/dist/tables/table-footer-cell.svelte +12 -0
- package/dist/tables/table-footer-cell.svelte.d.ts +18 -0
- package/dist/tables/table-footer-row.svelte +3 -0
- package/dist/tables/table-footer-row.svelte.d.ts +27 -0
- package/dist/tables/table-footer.svelte +11 -0
- package/dist/tables/table-footer.svelte.d.ts +27 -0
- package/dist/tables/table-header-cell.svelte +18 -0
- package/dist/tables/table-header-cell.svelte.d.ts +18 -0
- package/dist/tables/table-header-row.svelte +4 -0
- package/dist/tables/table-header-row.svelte.d.ts +27 -0
- package/dist/tables/table-header.svelte +14 -0
- package/dist/tables/table-header.svelte.d.ts +27 -0
- package/dist/tables/table-row.svelte +15 -0
- package/dist/tables/table-row.svelte.d.ts +27 -0
- package/dist/tables/table.svelte +10 -0
- package/dist/tables/table.svelte.d.ts +27 -0
- package/package.json +73 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: Record<string, never>;
|
|
4
|
+
events: {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
};
|
|
7
|
+
slots: {};
|
|
8
|
+
};
|
|
9
|
+
export type CardProps = typeof __propDef.props;
|
|
10
|
+
export type CardEvents = typeof __propDef.events;
|
|
11
|
+
export type CardSlots = typeof __propDef.slots;
|
|
12
|
+
export default class Card extends SvelteComponent<CardProps, CardEvents, CardSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script>import { navigateTo } from "../../../helpers/navigate-to.js";
|
|
2
|
+
export let title = void 0;
|
|
3
|
+
export let href = void 0;
|
|
4
|
+
$:
|
|
5
|
+
role = href ? "link" : "listitem";
|
|
6
|
+
const onClick = () => {
|
|
7
|
+
if (!href)
|
|
8
|
+
return;
|
|
9
|
+
navigateTo(href);
|
|
10
|
+
};
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<li {role} on:click={onClick}>
|
|
14
|
+
{#if title}
|
|
15
|
+
<strong>{title}</strong>
|
|
16
|
+
{/if}
|
|
17
|
+
<slot />
|
|
18
|
+
</li>
|
|
19
|
+
|
|
20
|
+
<style>li {
|
|
21
|
+
display: inline-block;
|
|
22
|
+
position: relative;
|
|
23
|
+
width: 100%;
|
|
24
|
+
max-width: 30rem;
|
|
25
|
+
margin-right: 1rem;
|
|
26
|
+
margin-bottom: 1rem;
|
|
27
|
+
padding: 1rem;
|
|
28
|
+
border-radius: 0.5rem;
|
|
29
|
+
background-color: #fff;
|
|
30
|
+
color: #555;
|
|
31
|
+
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
|
|
32
|
+
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
|
|
33
|
+
}
|
|
34
|
+
li strong {
|
|
35
|
+
display: block;
|
|
36
|
+
}
|
|
37
|
+
li[role=link] {
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}</style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
title?: string | undefined;
|
|
5
|
+
href?: string | undefined;
|
|
6
|
+
};
|
|
7
|
+
events: {
|
|
8
|
+
[evt: string]: CustomEvent<any>;
|
|
9
|
+
};
|
|
10
|
+
slots: {
|
|
11
|
+
default: {};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export type CardProps = typeof __propDef.props;
|
|
15
|
+
export type CardEvents = typeof __propDef.events;
|
|
16
|
+
export type CardSlots = typeof __propDef.slots;
|
|
17
|
+
export default class Card extends SvelteComponent<CardProps, CardEvents, CardSlots> {
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: Record<string, never>;
|
|
4
|
+
events: {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
};
|
|
7
|
+
slots: {};
|
|
8
|
+
};
|
|
9
|
+
export type DividerProps = typeof __propDef.props;
|
|
10
|
+
export type DividerEvents = typeof __propDef.events;
|
|
11
|
+
export type DividerSlots = typeof __propDef.slots;
|
|
12
|
+
export default class Divider extends SvelteComponent<DividerProps, DividerEvents, DividerSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} DividerProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} DividerEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} DividerSlots */
|
|
4
|
+
export default class Divider extends SvelteComponent<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type DividerProps = typeof __propDef.props;
|
|
11
|
+
export type DividerEvents = typeof __propDef.events;
|
|
12
|
+
export type DividerSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponent } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script>import { Meta, Story } from "@storybook/addon-svelte-csf";
|
|
2
|
+
import Link from "./link.svelte";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<Meta title="Generic/Link" component={Link} />
|
|
6
|
+
|
|
7
|
+
<Story name="Standard">
|
|
8
|
+
<Link href="https://www.google.com">Google</Link>
|
|
9
|
+
</Story>
|
|
10
|
+
|
|
11
|
+
<Story name="Underline on hover">
|
|
12
|
+
<Link href="https://www.google.com" underline="hover">Google</Link>
|
|
13
|
+
</Story>
|
|
14
|
+
|
|
15
|
+
<Story name="Underline always">
|
|
16
|
+
<Link href="https://www.google.com" underline="always">Google</Link>
|
|
17
|
+
</Story>
|
|
18
|
+
|
|
19
|
+
<Story name="Disabled">
|
|
20
|
+
<Link href="https://www.google.com" disabled={true}>Google</Link>
|
|
21
|
+
</Story>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: Record<string, never>;
|
|
4
|
+
events: {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
};
|
|
7
|
+
slots: {};
|
|
8
|
+
};
|
|
9
|
+
export type LinkProps = typeof __propDef.props;
|
|
10
|
+
export type LinkEvents = typeof __propDef.events;
|
|
11
|
+
export type LinkSlots = typeof __propDef.slots;
|
|
12
|
+
export default class Link extends SvelteComponent<LinkProps, LinkEvents, LinkSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script>export let href;
|
|
2
|
+
export let target = void 0;
|
|
3
|
+
export let underline = "none";
|
|
4
|
+
export let disabled = false;
|
|
5
|
+
export let display = "inline";
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
{#if disabled}
|
|
9
|
+
<span class="link underline-{underline} {display}">
|
|
10
|
+
<slot />
|
|
11
|
+
</span>
|
|
12
|
+
{:else}
|
|
13
|
+
<a {href} {target} class="link underline-{underline} {display}">
|
|
14
|
+
<slot />
|
|
15
|
+
</a>
|
|
16
|
+
{/if}
|
|
17
|
+
|
|
18
|
+
<style>.link {
|
|
19
|
+
text-decoration: underline;
|
|
20
|
+
color: inherit;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
.link.underline-none, .link.underline-hover {
|
|
24
|
+
text-decoration: none;
|
|
25
|
+
}
|
|
26
|
+
.link.block {
|
|
27
|
+
display: block;
|
|
28
|
+
width: 100%;
|
|
29
|
+
}
|
|
30
|
+
.link.inline-block {
|
|
31
|
+
display: inline-block;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
a.link.underline-hover:hover {
|
|
35
|
+
text-decoration: underline;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
span.link {
|
|
39
|
+
cursor: default;
|
|
40
|
+
color: rgba(255, 255, 255, 0.5);
|
|
41
|
+
}</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
href: string;
|
|
5
|
+
target?: string | undefined;
|
|
6
|
+
underline?: "none" | "hover" | "always" | undefined;
|
|
7
|
+
disabled?: boolean | undefined;
|
|
8
|
+
display?: "block" | "inline-block" | "inline" | undefined;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {
|
|
14
|
+
default: {};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export type LinkProps = typeof __propDef.props;
|
|
18
|
+
export type LinkEvents = typeof __propDef.events;
|
|
19
|
+
export type LinkSlots = typeof __propDef.slots;
|
|
20
|
+
export default class Link extends SvelteComponent<LinkProps, LinkEvents, LinkSlots> {
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export let show = true;
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<div class:show>
|
|
6
|
+
<slot />
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<style>
|
|
10
|
+
div {
|
|
11
|
+
display: none;
|
|
12
|
+
position: fixed;
|
|
13
|
+
top: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
right: 0;
|
|
16
|
+
bottom: 0;
|
|
17
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
18
|
+
z-index: 9998;
|
|
19
|
+
|
|
20
|
+
&.show {
|
|
21
|
+
display: block;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} OverlayProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} OverlayEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} OverlaySlots */
|
|
4
|
+
export default class Overlay extends SvelteComponent<{
|
|
5
|
+
show?: boolean | undefined;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {
|
|
9
|
+
default: {};
|
|
10
|
+
}> {
|
|
11
|
+
}
|
|
12
|
+
export type OverlayProps = typeof __propDef.props;
|
|
13
|
+
export type OverlayEvents = typeof __propDef.events;
|
|
14
|
+
export type OverlaySlots = typeof __propDef.slots;
|
|
15
|
+
import { SvelteComponent } from "svelte";
|
|
16
|
+
declare const __propDef: {
|
|
17
|
+
props: {
|
|
18
|
+
show?: boolean | undefined;
|
|
19
|
+
};
|
|
20
|
+
events: {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
};
|
|
23
|
+
slots: {
|
|
24
|
+
default: {};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script>import { Meta, Story } from "@storybook/addon-svelte-csf";
|
|
2
|
+
import Pill from "./pill.svelte";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<Meta title="Generic/Pill" component={Pill} />
|
|
6
|
+
|
|
7
|
+
<Story name="Small">
|
|
8
|
+
<Pill size="sm">Small</Pill>
|
|
9
|
+
</Story>
|
|
10
|
+
|
|
11
|
+
<Story name="Medium">
|
|
12
|
+
<Pill size="md">Medium</Pill>
|
|
13
|
+
</Story>
|
|
14
|
+
|
|
15
|
+
<Story name="Large">
|
|
16
|
+
<Pill size="lg">Large</Pill>
|
|
17
|
+
</Story>
|
|
18
|
+
|
|
19
|
+
<Story name="X-Large">
|
|
20
|
+
<Pill size="xl">Extra Large</Pill>
|
|
21
|
+
</Story>
|
|
22
|
+
|
|
23
|
+
<Story name="Badge">
|
|
24
|
+
<Pill size="lg" style="badge">Badge</Pill>
|
|
25
|
+
</Story>
|
|
26
|
+
|
|
27
|
+
<Story name="Square">
|
|
28
|
+
<Pill size="lg" style="square">Square</Pill>
|
|
29
|
+
</Story>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: Record<string, never>;
|
|
4
|
+
events: {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
};
|
|
7
|
+
slots: {};
|
|
8
|
+
};
|
|
9
|
+
export type PillProps = typeof __propDef.props;
|
|
10
|
+
export type PillEvents = typeof __propDef.events;
|
|
11
|
+
export type PillSlots = typeof __propDef.slots;
|
|
12
|
+
export default class Pill extends SvelteComponent<PillProps, PillEvents, PillSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script>export let size = "md";
|
|
2
|
+
export let style = "standard";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<span class="pill {size} {style}">
|
|
6
|
+
<slot />
|
|
7
|
+
</span>
|
|
8
|
+
|
|
9
|
+
<style>.pill {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
padding: 0.25rem 0.5rem;
|
|
12
|
+
border-radius: 1.5rem;
|
|
13
|
+
background-color: #f1f5f9;
|
|
14
|
+
font-size: 0.75rem;
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
color: #4a5568;
|
|
17
|
+
}
|
|
18
|
+
.pill.sm {
|
|
19
|
+
font-size: 0.625rem;
|
|
20
|
+
padding: 0.125rem 0.25rem;
|
|
21
|
+
}
|
|
22
|
+
.pill.lg {
|
|
23
|
+
font-size: 0.875rem;
|
|
24
|
+
padding: 0.375rem 0.75rem;
|
|
25
|
+
}
|
|
26
|
+
.pill.xl {
|
|
27
|
+
font-size: 1rem;
|
|
28
|
+
padding: 0.5rem 1rem;
|
|
29
|
+
}
|
|
30
|
+
.pill.badge {
|
|
31
|
+
border-radius: 0.5rem;
|
|
32
|
+
}
|
|
33
|
+
.pill.square {
|
|
34
|
+
border-radius: 0;
|
|
35
|
+
}</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { FormFieldSizeOptions } from '../../../types/form.js';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
size?: FormFieldSizeOptions | undefined;
|
|
6
|
+
style?: "standard" | "badge" | "square" | undefined;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {
|
|
12
|
+
default: {};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type PillProps = typeof __propDef.props;
|
|
16
|
+
export type PillEvents = typeof __propDef.events;
|
|
17
|
+
export type PillSlots = typeof __propDef.slots;
|
|
18
|
+
export default class Pill extends SvelteComponent<PillProps, PillEvents, PillSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<script>import { Meta, Story } from "@storybook/addon-svelte-csf";
|
|
2
|
+
import Scorecard from "./scorecard.svelte";
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<Meta title="Generic/Scorecard" component={Scorecard} />
|
|
6
|
+
|
|
7
|
+
<Story name="Default">
|
|
8
|
+
<Scorecard value={123}>Page Views</Scorecard>
|
|
9
|
+
</Story>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: Record<string, never>;
|
|
4
|
+
events: {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
};
|
|
7
|
+
slots: {};
|
|
8
|
+
};
|
|
9
|
+
export type ScorecardProps = typeof __propDef.props;
|
|
10
|
+
export type ScorecardEvents = typeof __propDef.events;
|
|
11
|
+
export type ScorecardSlots = typeof __propDef.slots;
|
|
12
|
+
export default class Scorecard extends SvelteComponent<ScorecardProps, ScorecardEvents, ScorecardSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script>export let value;
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<figure>
|
|
5
|
+
<div>{value}</div>
|
|
6
|
+
<figcaption><slot /></figcaption>
|
|
7
|
+
</figure>
|
|
8
|
+
|
|
9
|
+
<style>figure {
|
|
10
|
+
display: inline-block;
|
|
11
|
+
text-align: center;
|
|
12
|
+
background: #fff;
|
|
13
|
+
border-radius: 0.25rem;
|
|
14
|
+
padding: 1rem;
|
|
15
|
+
box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.1);
|
|
16
|
+
font-family: sans-serif;
|
|
17
|
+
min-width: 6rem;
|
|
18
|
+
}
|
|
19
|
+
figure div {
|
|
20
|
+
font-size: 2.5rem;
|
|
21
|
+
font-weight: 500;
|
|
22
|
+
color: #000;
|
|
23
|
+
}
|
|
24
|
+
figure figcaption {
|
|
25
|
+
font-size: 0.875rem;
|
|
26
|
+
font-weight: 300;
|
|
27
|
+
color: #4a5568;
|
|
28
|
+
}</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
value: string | number;
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {
|
|
10
|
+
default: {};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export type ScorecardProps = typeof __propDef.props;
|
|
14
|
+
export type ScorecardEvents = typeof __propDef.events;
|
|
15
|
+
export type ScorecardSlots = typeof __propDef.slots;
|
|
16
|
+
export default class Scorecard extends SvelteComponent<ScorecardProps, ScorecardEvents, ScorecardSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: Record<string, never>;
|
|
4
|
+
events: {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
};
|
|
7
|
+
slots: {};
|
|
8
|
+
};
|
|
9
|
+
export type AngleRightIconProps = typeof __propDef.props;
|
|
10
|
+
export type AngleRightIconEvents = typeof __propDef.events;
|
|
11
|
+
export type AngleRightIconSlots = typeof __propDef.slots;
|
|
12
|
+
export default class AngleRightIcon extends SvelteComponent<AngleRightIconProps, AngleRightIconEvents, AngleRightIconSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} AngleUpIconProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} AngleUpIconEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} AngleUpIconSlots */
|
|
4
|
+
export default class AngleUpIcon extends SvelteComponent<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type AngleUpIconProps = typeof __propDef.props;
|
|
11
|
+
export type AngleUpIconEvents = typeof __propDef.events;
|
|
12
|
+
export type AngleUpIconSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponent } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<script>import SvgIcon from "./svg-icon.svelte";
|
|
2
|
+
</script>
|
|
3
|
+
|
|
4
|
+
<SvgIcon width={20} height={20} fill="currentColor">
|
|
5
|
+
<path
|
|
6
|
+
d="m19.707 9.293-2-2-7-7a1 1 0 0 0-1.414 0l-7 7-2 2a1 1 0 0 0 1.414 1.414L2 10.414V18a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-4a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v4a1 1 0 0 0 1 1h3a2 2 0 0 0 2-2v-7.586l.293.293a1 1 0 0 0 1.414-1.414Z"
|
|
7
|
+
/>
|
|
8
|
+
</SvgIcon>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: Record<string, never>;
|
|
4
|
+
events: {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
};
|
|
7
|
+
slots: {};
|
|
8
|
+
};
|
|
9
|
+
export type HomeIconProps = typeof __propDef.props;
|
|
10
|
+
export type HomeIconEvents = typeof __propDef.events;
|
|
11
|
+
export type HomeIconSlots = typeof __propDef.slots;
|
|
12
|
+
export default class HomeIcon extends SvelteComponent<HomeIconProps, HomeIconEvents, HomeIconSlots> {
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script>export let fill = "none";
|
|
2
|
+
export let width = 16;
|
|
3
|
+
export let height = 16;
|
|
4
|
+
export let x = 0;
|
|
5
|
+
export let y = 0;
|
|
6
|
+
export let aspectRatioBehavior = "meet";
|
|
7
|
+
export let aspectRatioAlign = "xMidYMid";
|
|
8
|
+
$:
|
|
9
|
+
viewBox = `${x} ${y} ${width} ${height}`;
|
|
10
|
+
$:
|
|
11
|
+
preserveAspectRatio = `${aspectRatioAlign} ${aspectRatioBehavior}`;
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" {fill} {viewBox} {preserveAspectRatio}>
|
|
15
|
+
<slot />
|
|
16
|
+
</svg>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
fill?: "none" | "currentColor" | undefined;
|
|
5
|
+
width?: string | number | undefined;
|
|
6
|
+
height?: string | number | undefined;
|
|
7
|
+
x?: string | number | undefined;
|
|
8
|
+
y?: string | number | undefined;
|
|
9
|
+
aspectRatioBehavior?: "none" | "slice" | "meet" | undefined;
|
|
10
|
+
aspectRatioAlign?: "none" | "xMinYMin" | "xMidYMin" | "xMaxYMin" | "xMinYMid" | "xMidYMid" | "xMaxYMid" | "xMinYMax" | "xMidYMax" | "xMaxYMax" | undefined;
|
|
11
|
+
};
|
|
12
|
+
events: {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
};
|
|
15
|
+
slots: {
|
|
16
|
+
default: {};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type SvgIconProps = typeof __propDef.props;
|
|
20
|
+
export type SvgIconEvents = typeof __propDef.events;
|
|
21
|
+
export type SvgIconSlots = typeof __propDef.slots;
|
|
22
|
+
export default class SvgIcon extends SvelteComponent<SvgIconProps, SvgIconEvents, SvgIconSlots> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 19">
|
|
2
|
+
<path
|
|
3
|
+
stroke="currentColor"
|
|
4
|
+
stroke-linecap="round"
|
|
5
|
+
stroke-linejoin="round"
|
|
6
|
+
stroke-width="2"
|
|
7
|
+
d="M15 15h.01M4 12H2a1 1 0 0 0-1 1v4a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-3m-5.5 0V1.07M5.5 5l4-4 4 4"
|
|
8
|
+
/>
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} UploadIconProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} UploadIconEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} UploadIconSlots */
|
|
4
|
+
export default class UploadIcon extends SvelteComponent<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {}> {
|
|
9
|
+
}
|
|
10
|
+
export type UploadIconProps = typeof __propDef.props;
|
|
11
|
+
export type UploadIconEvents = typeof __propDef.events;
|
|
12
|
+
export type UploadIconSlots = typeof __propDef.slots;
|
|
13
|
+
import { SvelteComponent } from "svelte";
|
|
14
|
+
declare const __propDef: {
|
|
15
|
+
props: {
|
|
16
|
+
[x: string]: never;
|
|
17
|
+
};
|
|
18
|
+
events: {
|
|
19
|
+
[evt: string]: CustomEvent<any>;
|
|
20
|
+
};
|
|
21
|
+
slots: {};
|
|
22
|
+
};
|
|
23
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
File without changes
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script>export let marginY = 1;
|
|
2
|
+
export let marginX = 0;
|
|
3
|
+
export let gap = 1;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<div style={`margin: ${marginY}rem ${marginX}rem; gap: ${gap}rem`}>
|
|
7
|
+
<slot />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<style>div {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
width: 100%;
|
|
14
|
+
}</style>
|