sveltacular 0.0.16 → 0.0.18
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/dist/forms/bool-box/bool-box.svelte +19 -0
- package/dist/forms/bool-box/bool-box.svelte.d.ts +23 -0
- package/dist/forms/button/button.svelte +1 -0
- package/dist/forms/form-field.svelte +1 -0
- package/dist/forms/list-box/list-box.svelte +1 -1
- package/dist/generic/card/card.svelte +2 -2
- package/dist/generic/date/{date.svelte → date-time.svelte} +6 -0
- package/dist/generic/date/date-time.svelte.d.ts +21 -0
- package/dist/generic/header/header.svelte +1 -0
- package/dist/generic/menu/menu.svelte +1 -0
- package/dist/generic/panel/panel.svelte +2 -0
- package/dist/generic/pill/pill.svelte +1 -0
- package/dist/generic/scorecard/scorecard.svelte +1 -0
- package/dist/generic/section/section.svelte +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +6 -1
- package/dist/modals/dialog-close-button.svelte +1 -1
- package/dist/modals/dialog-header.svelte +1 -0
- package/dist/modals/dialog-window.svelte +1 -0
- package/dist/navigation/accordian/accordian.svelte +1 -1
- package/dist/navigation/app-bar/app-nav-item.svelte +2 -1
- package/dist/navigation/app-bar/app-nav.svelte +2 -1
- package/dist/navigation/breadcrumbs/breadcrumbs.svelte +1 -1
- package/dist/navigation/side-bar/side-bar.svelte +1 -0
- package/dist/navigation/tabs/tab-group.svelte +1 -0
- package/dist/navigation/tabs/tab.svelte +1 -1
- package/dist/tables/data-grid.svelte +2 -2
- package/dist/tables/table.svelte +1 -0
- package/dist/timeline/timeline-item.svelte +85 -0
- package/dist/timeline/timeline-item.svelte.d.ts +24 -0
- package/dist/timeline/timeline.svelte +13 -0
- package/dist/timeline/timeline.svelte.d.ts +27 -0
- package/dist/types/date.d.ts +3 -0
- package/dist/types/date.js +1 -0
- package/dist/typography/code-block.svelte +1 -1
- package/dist/typography/heading.svelte +1 -0
- package/dist/typography/paragraph.svelte +1 -0
- package/dist/typography/subtitle.svelte +1 -0
- package/dist/typography/text.svelte +4 -1
- package/package.json +1 -1
- package/dist/generic/date/date.svelte.d.ts +0 -20
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script>import { createEventDispatcher } from "svelte";
|
|
2
|
+
import ListBox from "../list-box/list-box.svelte";
|
|
3
|
+
const dispatch = createEventDispatcher();
|
|
4
|
+
export let value = false;
|
|
5
|
+
export let options = ["Yes", "No"];
|
|
6
|
+
export let size = "md";
|
|
7
|
+
let stringValue = value ? "true" : "false";
|
|
8
|
+
const onChange = () => {
|
|
9
|
+
value = stringValue == "true";
|
|
10
|
+
dispatch("change", value);
|
|
11
|
+
};
|
|
12
|
+
$:
|
|
13
|
+
items = [
|
|
14
|
+
{ value: "true", name: options[0] },
|
|
15
|
+
{ value: "false", name: options[1] }
|
|
16
|
+
];
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<ListBox {items} bind:value={stringValue} {size} on:change={onChange}><slot /></ListBox>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { FormFieldSizeOptions } from '../../index.js';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
value?: boolean | undefined;
|
|
6
|
+
options?: [yes: string, no: string] | undefined;
|
|
7
|
+
size?: FormFieldSizeOptions | undefined;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
change: CustomEvent<boolean>;
|
|
11
|
+
} & {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
};
|
|
14
|
+
slots: {
|
|
15
|
+
default: {};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export type BoolBoxProps = typeof __propDef.props;
|
|
19
|
+
export type BoolBoxEvents = typeof __propDef.events;
|
|
20
|
+
export type BoolBoxSlots = typeof __propDef.slots;
|
|
21
|
+
export default class BoolBox extends SvelteComponent<BoolBoxProps, BoolBoxEvents, BoolBoxSlots> {
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -41,6 +41,7 @@ const click = () => {
|
|
|
41
41
|
transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out, color 0.2s ease-in-out, fill 0.2s ease-in-out, stroke 0.2s ease-in-out;
|
|
42
42
|
user-select: none;
|
|
43
43
|
white-space: nowrap;
|
|
44
|
+
font-family: var(--base-font-family, sans-serif);
|
|
44
45
|
}
|
|
45
46
|
button.flex {
|
|
46
47
|
flex-grow: 1;
|
|
@@ -81,7 +81,7 @@ $:
|
|
|
81
81
|
on:focus={() => (open = true)}
|
|
82
82
|
on:keyup={onInputKeyPress}
|
|
83
83
|
/>
|
|
84
|
-
<button class="icon" on:click={toggle} on:keydown={toggle}>
|
|
84
|
+
<button type="button" class="icon" on:click={toggle} on:keydown={toggle}>
|
|
85
85
|
<AngleUpIcon />
|
|
86
86
|
</button>
|
|
87
87
|
<div class="dropdown">
|
|
@@ -28,8 +28,8 @@ const onClick = () => {
|
|
|
28
28
|
border-radius: 0.5rem;
|
|
29
29
|
background-color: #fff;
|
|
30
30
|
color: #555;
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
transition: transform 0.2s ease-in-out;
|
|
32
|
+
font-family: var(--base-font-family, sans-serif);
|
|
33
33
|
}
|
|
34
34
|
li strong {
|
|
35
35
|
display: block;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { DateTimeStyle, DateType } from '../../types/date.js';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
value?: string | number | Date | undefined;
|
|
6
|
+
lang?: string | undefined;
|
|
7
|
+
type?: DateType | undefined;
|
|
8
|
+
style?: DateTimeStyle | undefined;
|
|
9
|
+
dateTimeSeparator?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
events: {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
};
|
|
14
|
+
slots: {};
|
|
15
|
+
};
|
|
16
|
+
export type DateTimeProps = typeof __propDef.props;
|
|
17
|
+
export type DateTimeEvents = typeof __propDef.events;
|
|
18
|
+
export type DateTimeSlots = typeof __propDef.slots;
|
|
19
|
+
export default class DateTime extends SvelteComponent<DateTimeProps, DateTimeEvents, DateTimeSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -15,6 +15,7 @@ export let border = true;
|
|
|
15
15
|
padding: 1rem;
|
|
16
16
|
border: soild 1px rgba(100, 100, 100, 0.5);
|
|
17
17
|
border-radius: 0.5rem;
|
|
18
|
+
font-family: var(--base-font-family, sans-serif);
|
|
18
19
|
}
|
|
19
20
|
fieldset.no-border {
|
|
20
21
|
border: none;
|
|
@@ -24,4 +25,5 @@ fieldset legend {
|
|
|
24
25
|
font-weight: 500;
|
|
25
26
|
text-transform: uppercase;
|
|
26
27
|
letter-spacing: 0.1rem;
|
|
28
|
+
font-family: var(--base-headline-font-family, sans-serif);
|
|
27
29
|
}</style>
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { default as CheckBox } from './forms/check-box/check-box.svelte';
|
|
|
3
3
|
export { default as CheckBoxGroup } from './forms/check-box/check-box-group.svelte';
|
|
4
4
|
export { default as DateBox } from './forms/date-box/date-box.svelte';
|
|
5
5
|
export { default as ListBox } from './forms/list-box/list-box.svelte';
|
|
6
|
+
export { default as BoolBox } from './forms/bool-box/bool-box.svelte';
|
|
6
7
|
export { default as FileBox } from './forms/file-box/file-box.svelte';
|
|
7
8
|
export { default as FileArea } from './forms/file-area/file-area.svelte';
|
|
8
9
|
export { default as NumberBox } from './forms/number-box/number-box.svelte';
|
|
@@ -23,7 +24,7 @@ export { default as Overlay } from './generic/overlay.svelte';
|
|
|
23
24
|
export { default as Image } from './images/image.svelte';
|
|
24
25
|
export { default as Icon } from './images/icon.svelte';
|
|
25
26
|
export { default as Menu } from './generic/menu/menu.svelte';
|
|
26
|
-
export { default as
|
|
27
|
+
export { default as DateTime } from './generic/date/date-time.svelte';
|
|
27
28
|
export { default as Panel } from './generic/panel/panel.svelte';
|
|
28
29
|
export { default as Section } from './generic/section/section.svelte';
|
|
29
30
|
export { default as Header } from './generic/header/header.svelte';
|
|
@@ -65,7 +66,10 @@ export { default as Subtitle } from './typography/subtitle.svelte';
|
|
|
65
66
|
export { default as Text } from './typography/text.svelte';
|
|
66
67
|
export { default as CodeBlock } from './typography/code-block.svelte';
|
|
67
68
|
export { default as Paragraph } from './typography/paragraph.svelte';
|
|
69
|
+
export { default as Timeline } from './timeline/timeline.svelte';
|
|
70
|
+
export { default as TimelineItem } from './timeline/timeline-item.svelte';
|
|
68
71
|
export * from './types/data.js';
|
|
72
|
+
export * from './types/date.js';
|
|
69
73
|
export * from './types/form.js';
|
|
70
74
|
export * from './helpers/date.js';
|
|
71
75
|
export * from './helpers/navigate-to.js';
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export { default as CheckBox } from './forms/check-box/check-box.svelte';
|
|
|
4
4
|
export { default as CheckBoxGroup } from './forms/check-box/check-box-group.svelte';
|
|
5
5
|
export { default as DateBox } from './forms/date-box/date-box.svelte';
|
|
6
6
|
export { default as ListBox } from './forms/list-box/list-box.svelte';
|
|
7
|
+
export { default as BoolBox } from './forms/bool-box/bool-box.svelte';
|
|
7
8
|
export { default as FileBox } from './forms/file-box/file-box.svelte';
|
|
8
9
|
export { default as FileArea } from './forms/file-area/file-area.svelte';
|
|
9
10
|
export { default as NumberBox } from './forms/number-box/number-box.svelte';
|
|
@@ -25,7 +26,7 @@ export { default as Overlay } from './generic/overlay.svelte';
|
|
|
25
26
|
export { default as Image } from './images/image.svelte';
|
|
26
27
|
export { default as Icon } from './images/icon.svelte';
|
|
27
28
|
export { default as Menu } from './generic/menu/menu.svelte';
|
|
28
|
-
export { default as
|
|
29
|
+
export { default as DateTime } from './generic/date/date-time.svelte';
|
|
29
30
|
export { default as Panel } from './generic/panel/panel.svelte';
|
|
30
31
|
export { default as Section } from './generic/section/section.svelte';
|
|
31
32
|
export { default as Header } from './generic/header/header.svelte';
|
|
@@ -72,8 +73,12 @@ export { default as Subtitle } from './typography/subtitle.svelte';
|
|
|
72
73
|
export { default as Text } from './typography/text.svelte';
|
|
73
74
|
export { default as CodeBlock } from './typography/code-block.svelte';
|
|
74
75
|
export { default as Paragraph } from './typography/paragraph.svelte';
|
|
76
|
+
// Timeline
|
|
77
|
+
export { default as Timeline } from './timeline/timeline.svelte';
|
|
78
|
+
export { default as TimelineItem } from './timeline/timeline-item.svelte';
|
|
75
79
|
// Types
|
|
76
80
|
export * from './types/data.js';
|
|
81
|
+
export * from './types/date.js';
|
|
77
82
|
export * from './types/form.js';
|
|
78
83
|
// Helpers
|
|
79
84
|
export * from './helpers/date.js';
|
|
@@ -11,7 +11,7 @@ const click = () => {
|
|
|
11
11
|
};
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
|
-
<button class={$open ? 'open' : 'closed'} on:click={click}>
|
|
14
|
+
<button type="button" class={$open ? 'open' : 'closed'} on:click={click}>
|
|
15
15
|
{#if $$slots.default}
|
|
16
16
|
<div class="icon">
|
|
17
17
|
<slot />
|
|
@@ -28,6 +28,7 @@ const click = () => {
|
|
|
28
28
|
gap: 0.2rem;
|
|
29
29
|
align-items: center;
|
|
30
30
|
height: 100%;
|
|
31
|
+
font-family: var(--nav-font-family, sans-serif);
|
|
31
32
|
color: var(--nav-link-fg, black);
|
|
32
33
|
text-decoration: none;
|
|
33
34
|
appearance: none;
|
|
@@ -11,7 +11,7 @@ const collapse = context.position !== "bottom" ? "collapse" : "";
|
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
<div class="icon {$open ? 'open' : 'closed'} {collapse}">
|
|
14
|
-
<button on:click={toggle}>
|
|
14
|
+
<button type="button" on:click={toggle}>
|
|
15
15
|
<HamburgerIcon />
|
|
16
16
|
</button>
|
|
17
17
|
</div>
|
|
@@ -32,6 +32,7 @@ nav {
|
|
|
32
32
|
width: 100%;
|
|
33
33
|
align-items: center;
|
|
34
34
|
justify-content: center;
|
|
35
|
+
font-family: var(--nav-font-family, sans-serif);
|
|
35
36
|
}
|
|
36
37
|
nav.left, nav.start {
|
|
37
38
|
justify-content: flex-start;
|
|
@@ -89,10 +89,10 @@ $:
|
|
|
89
89
|
{#if hasActionRow}
|
|
90
90
|
<TableCell type="actions">
|
|
91
91
|
{#if editRow}
|
|
92
|
-
<button on:click={() => clickEdit(row)}>Edit</button>
|
|
92
|
+
<button type="button" on:click={() => clickEdit(row)}>Edit</button>
|
|
93
93
|
{/if}
|
|
94
94
|
{#if deleteRow}
|
|
95
|
-
<button on:click={() => clickDelete(row)}>Delete</button>
|
|
95
|
+
<button type="button" on:click={() => clickDelete(row)}>Delete</button>
|
|
96
96
|
{/if}
|
|
97
97
|
</TableCell>
|
|
98
98
|
{/if}
|
package/dist/tables/table.svelte
CHANGED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<script>import DateTime from "../generic/date/date-time.svelte";
|
|
2
|
+
export let dateType = "datetime";
|
|
3
|
+
export let dateStyle = "medium";
|
|
4
|
+
export let iconSize = "md";
|
|
5
|
+
export let date;
|
|
6
|
+
export let title;
|
|
7
|
+
export let summary;
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<li class="icon-{iconSize}">
|
|
11
|
+
<div class="timeline-icon">
|
|
12
|
+
<slot name="icon" />
|
|
13
|
+
</div>
|
|
14
|
+
<div class="content">
|
|
15
|
+
<div class="date">
|
|
16
|
+
<DateTime value={date} type={dateType} style={dateStyle} />
|
|
17
|
+
</div>
|
|
18
|
+
<div class="title">
|
|
19
|
+
{title}
|
|
20
|
+
</div>
|
|
21
|
+
<div class="summary">
|
|
22
|
+
{summary}
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</li>
|
|
26
|
+
|
|
27
|
+
<style>li {
|
|
28
|
+
margin-bottom: 2rem;
|
|
29
|
+
position: relative;
|
|
30
|
+
}
|
|
31
|
+
li .content {
|
|
32
|
+
padding-left: 1rem;
|
|
33
|
+
padding-top: 0.25rem;
|
|
34
|
+
}
|
|
35
|
+
li .content .date {
|
|
36
|
+
font-size: 0.8rem;
|
|
37
|
+
font-weight: 300;
|
|
38
|
+
margin-bottom: 0.3rem;
|
|
39
|
+
opacity: 0.7;
|
|
40
|
+
text-transform: uppercase;
|
|
41
|
+
line-height: 1.4em;
|
|
42
|
+
}
|
|
43
|
+
li .content .title {
|
|
44
|
+
font-size: 1.2rem;
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
margin-bottom: 0.5rem;
|
|
47
|
+
line-height: 1.4em;
|
|
48
|
+
font-family: var(--base-headline-font-family, sans-serif);
|
|
49
|
+
}
|
|
50
|
+
li .content .summary {
|
|
51
|
+
font-size: 1rem;
|
|
52
|
+
font-weight: 300;
|
|
53
|
+
line-height: 1.4em;
|
|
54
|
+
opacity: 0.7;
|
|
55
|
+
}
|
|
56
|
+
li .timeline-icon {
|
|
57
|
+
width: 1.5rem;
|
|
58
|
+
height: 1.5rem;
|
|
59
|
+
border-radius: 50%;
|
|
60
|
+
border-color: #000;
|
|
61
|
+
border-style: solid;
|
|
62
|
+
border-width: 0.2rem;
|
|
63
|
+
background-color: #fff;
|
|
64
|
+
display: inline-block;
|
|
65
|
+
position: absolute;
|
|
66
|
+
top: 0;
|
|
67
|
+
left: -0.75rem;
|
|
68
|
+
}
|
|
69
|
+
li.icon-sm .content {
|
|
70
|
+
padding-top: 0;
|
|
71
|
+
}
|
|
72
|
+
li.icon-sm .timeline-icon {
|
|
73
|
+
width: 1rem;
|
|
74
|
+
height: 1rem;
|
|
75
|
+
left: -0.5rem;
|
|
76
|
+
}
|
|
77
|
+
li.icon-lg .content {
|
|
78
|
+
padding-top: 0.5rem;
|
|
79
|
+
padding-left: 1.5rem;
|
|
80
|
+
}
|
|
81
|
+
li.icon-lg .timeline-icon {
|
|
82
|
+
width: 2rem;
|
|
83
|
+
height: 2rem;
|
|
84
|
+
left: -1rem;
|
|
85
|
+
}</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import type { DateTimeStyle, DateType } from '../index.js';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
dateType?: DateType | undefined;
|
|
6
|
+
dateStyle?: DateTimeStyle | undefined;
|
|
7
|
+
iconSize?: "sm" | "md" | "lg" | undefined;
|
|
8
|
+
date: string | number | Date;
|
|
9
|
+
title: string;
|
|
10
|
+
summary: string;
|
|
11
|
+
};
|
|
12
|
+
events: {
|
|
13
|
+
[evt: string]: CustomEvent<any>;
|
|
14
|
+
};
|
|
15
|
+
slots: {
|
|
16
|
+
icon: {};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type TimelineItemProps = typeof __propDef.props;
|
|
20
|
+
export type TimelineItemEvents = typeof __propDef.events;
|
|
21
|
+
export type TimelineItemSlots = typeof __propDef.slots;
|
|
22
|
+
export default class TimelineItem extends SvelteComponent<TimelineItemProps, TimelineItemEvents, TimelineItemSlots> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** @typedef {typeof __propDef.props} TimelineProps */
|
|
2
|
+
/** @typedef {typeof __propDef.events} TimelineEvents */
|
|
3
|
+
/** @typedef {typeof __propDef.slots} TimelineSlots */
|
|
4
|
+
export default class Timeline extends SvelteComponent<{
|
|
5
|
+
[x: string]: never;
|
|
6
|
+
}, {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
}, {
|
|
9
|
+
default: {};
|
|
10
|
+
}> {
|
|
11
|
+
}
|
|
12
|
+
export type TimelineProps = typeof __propDef.props;
|
|
13
|
+
export type TimelineEvents = typeof __propDef.events;
|
|
14
|
+
export type TimelineSlots = typeof __propDef.slots;
|
|
15
|
+
import { SvelteComponent } from "svelte";
|
|
16
|
+
declare const __propDef: {
|
|
17
|
+
props: {
|
|
18
|
+
[x: string]: never;
|
|
19
|
+
};
|
|
20
|
+
events: {
|
|
21
|
+
[evt: string]: CustomEvent<any>;
|
|
22
|
+
};
|
|
23
|
+
slots: {
|
|
24
|
+
default: {};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type DateTimeStyle = 'full' | 'long' | 'short' | 'medium';
|
|
2
|
+
export type TZStyle = 'long' | 'short' | 'shortOffset' | 'longOffset' | 'shortGeneric' | 'longGeneric';
|
|
3
|
+
export type DateType = 'date' | 'time' | 'datetime' | 'ago' | 'ymd' | 'ymdhm' | 'ymdhms' | 'ymdhmt' | 'ymdhmst';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
|
-
declare const __propDef: {
|
|
3
|
-
props: {
|
|
4
|
-
value?: string | number | undefined;
|
|
5
|
-
lang?: string | undefined;
|
|
6
|
-
type?: "date" | "time" | "datetime" | "ago" | "ymd" | "ymdhm" | "ymdhms" | "ymdhmt" | "ymdhmst" | undefined;
|
|
7
|
-
style?: ("full" | "long" | "short" | "medium") | undefined;
|
|
8
|
-
dateTimeSeparator?: string | undefined;
|
|
9
|
-
};
|
|
10
|
-
events: {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {};
|
|
14
|
-
};
|
|
15
|
-
export type DateProps = typeof __propDef.props;
|
|
16
|
-
export type DateEvents = typeof __propDef.events;
|
|
17
|
-
export type DateSlots = typeof __propDef.slots;
|
|
18
|
-
export default class Date extends SvelteComponent<DateProps, DateEvents, DateSlots> {
|
|
19
|
-
}
|
|
20
|
-
export {};
|