sveltacular 0.0.37 → 0.0.38
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/generic/card/card-container.d.ts +3 -0
- package/dist/generic/card/card-container.js +1 -0
- package/dist/generic/card/card-container.svelte +58 -15
- package/dist/generic/card/card-container.svelte.d.ts +7 -15
- package/dist/generic/card/card.svelte +6 -1
- package/dist/generic/card/card.svelte.d.ts +1 -1
- package/dist/generic/scorecard/scorecard.svelte.d.ts +1 -1
- package/dist/modals/dialog-window.svelte +12 -10
- package/dist/navigation/app-bar/app-nav.svelte.d.ts +1 -1
- package/dist/navigation/tabs/tab.svelte +0 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,18 +1,61 @@
|
|
|
1
|
-
<
|
|
1
|
+
<script>import { setContext } from "svelte";
|
|
2
|
+
export let align = "left";
|
|
3
|
+
export let spacing = "space-around";
|
|
4
|
+
let cards = [];
|
|
5
|
+
const register = (id) => {
|
|
6
|
+
cards = [...cards, id];
|
|
7
|
+
};
|
|
8
|
+
setContext("CardContainer", {
|
|
9
|
+
register
|
|
10
|
+
});
|
|
11
|
+
$:
|
|
12
|
+
count = cards.length;
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<ul data-count={count} class="{spacing} {align}">
|
|
2
16
|
<slot />
|
|
3
17
|
</ul>
|
|
4
18
|
|
|
5
|
-
<style>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
<style>ul {
|
|
20
|
+
list-style: none;
|
|
21
|
+
padding: 0;
|
|
22
|
+
margin: 0;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
flex-direction: row;
|
|
26
|
+
align-items: stretch;
|
|
27
|
+
justify-content: space-between;
|
|
28
|
+
align-content: stretch;
|
|
29
|
+
row-gap: 1rem;
|
|
30
|
+
column-gap: 1rem;
|
|
31
|
+
}
|
|
32
|
+
ul.left, ul.start {
|
|
33
|
+
justify-content: flex-start;
|
|
34
|
+
}
|
|
35
|
+
ul.center {
|
|
36
|
+
justify-content: center;
|
|
37
|
+
}
|
|
38
|
+
ul.right {
|
|
39
|
+
justify-content: flex-end;
|
|
40
|
+
}
|
|
41
|
+
ul.none {
|
|
42
|
+
gap: 0;
|
|
43
|
+
}
|
|
44
|
+
ul.tight {
|
|
45
|
+
gap: 0.5rem;
|
|
46
|
+
}
|
|
47
|
+
ul.compact {
|
|
48
|
+
gap: 1rem;
|
|
49
|
+
}
|
|
50
|
+
ul.loose {
|
|
51
|
+
gap: 2rem;
|
|
52
|
+
}
|
|
53
|
+
ul.space-evenly {
|
|
54
|
+
justify-content: space-evenly;
|
|
55
|
+
}
|
|
56
|
+
ul.space-between {
|
|
57
|
+
justify-content: space-between;
|
|
58
|
+
}
|
|
59
|
+
ul.space-around {
|
|
60
|
+
justify-content: space-around;
|
|
61
|
+
}</style>
|
|
@@ -1,21 +1,8 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} CardContainerProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} CardContainerEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} CardContainerSlots */
|
|
4
|
-
export default class CardContainer extends SvelteComponent<{
|
|
5
|
-
[x: string]: never;
|
|
6
|
-
}, {
|
|
7
|
-
[evt: string]: CustomEvent<any>;
|
|
8
|
-
}, {
|
|
9
|
-
default: {};
|
|
10
|
-
}> {
|
|
11
|
-
}
|
|
12
|
-
export type CardContainerProps = typeof __propDef.props;
|
|
13
|
-
export type CardContainerEvents = typeof __propDef.events;
|
|
14
|
-
export type CardContainerSlots = typeof __propDef.slots;
|
|
15
1
|
import { SvelteComponent } from "svelte";
|
|
16
2
|
declare const __propDef: {
|
|
17
3
|
props: {
|
|
18
|
-
|
|
4
|
+
align?: "center" | "end" | "start" | "left" | "right" | undefined;
|
|
5
|
+
spacing?: "none" | "tight" | "compact" | "loose" | "space-evenly" | "space-around" | "space-between" | undefined;
|
|
19
6
|
};
|
|
20
7
|
events: {
|
|
21
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -24,4 +11,9 @@ declare const __propDef: {
|
|
|
24
11
|
default: {};
|
|
25
12
|
};
|
|
26
13
|
};
|
|
14
|
+
export type CardContainerProps = typeof __propDef.props;
|
|
15
|
+
export type CardContainerEvents = typeof __propDef.events;
|
|
16
|
+
export type CardContainerSlots = typeof __propDef.slots;
|
|
17
|
+
export default class CardContainer extends SvelteComponent<CardContainerProps, CardContainerEvents, CardContainerSlots> {
|
|
18
|
+
}
|
|
27
19
|
export {};
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
<script>import { navigateTo } from "../../helpers/navigate-to.js";
|
|
2
|
+
import { uniqueId } from "../../index.js";
|
|
3
|
+
import { getContext } from "svelte";
|
|
2
4
|
export let title = void 0;
|
|
3
5
|
export let href = void 0;
|
|
4
6
|
export let size = "md";
|
|
5
7
|
$:
|
|
6
8
|
role = href ? "link" : "listitem";
|
|
9
|
+
const id = uniqueId();
|
|
7
10
|
const onClick = () => {
|
|
8
11
|
if (!href)
|
|
9
12
|
return;
|
|
10
13
|
navigateTo(href);
|
|
11
14
|
};
|
|
15
|
+
const container = getContext("CardContainer");
|
|
16
|
+
container.register(id);
|
|
12
17
|
</script>
|
|
13
18
|
|
|
14
|
-
<li {role} on:click={onClick} class="{size} {role}">
|
|
19
|
+
<li {role} {id} on:click={onClick} class="{size} {role}">
|
|
15
20
|
{#if title}
|
|
16
21
|
<strong>{title}</strong>
|
|
17
22
|
{/if}
|
|
@@ -2,7 +2,7 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
value: string | number;
|
|
5
|
-
caption?: "
|
|
5
|
+
caption?: "left" | "right" | "above" | "below" | undefined;
|
|
6
6
|
href?: string | undefined;
|
|
7
7
|
};
|
|
8
8
|
events: {
|
|
@@ -17,26 +17,28 @@ const captureClick = (e) => {
|
|
|
17
17
|
background-color: #fff;
|
|
18
18
|
border-radius: 1rem;
|
|
19
19
|
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
|
|
20
|
-
width: 20rem;
|
|
21
|
-
max-width: 70%;
|
|
22
20
|
z-index: 9999;
|
|
23
21
|
font-family: var(--base-font-family, sans-serif);
|
|
24
22
|
}
|
|
25
23
|
div.sm {
|
|
26
|
-
width: 15rem;
|
|
27
|
-
max-width: 50%;
|
|
28
|
-
}
|
|
29
|
-
div.lg {
|
|
30
24
|
width: 25rem;
|
|
31
25
|
max-width: 80%;
|
|
32
26
|
}
|
|
33
|
-
div.
|
|
34
|
-
width:
|
|
27
|
+
div.md {
|
|
28
|
+
width: 35rem;
|
|
29
|
+
max-width: 85%;
|
|
30
|
+
}
|
|
31
|
+
div.lg {
|
|
32
|
+
width: 50rem;
|
|
35
33
|
max-width: 90%;
|
|
36
34
|
}
|
|
35
|
+
div.xl {
|
|
36
|
+
width: 65rem;
|
|
37
|
+
max-width: 95%;
|
|
38
|
+
}
|
|
37
39
|
div.full {
|
|
38
|
-
width:
|
|
39
|
-
max-width:
|
|
40
|
+
width: 98%;
|
|
41
|
+
max-width: 98%;
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
@media (max-width: 640px) {
|
|
@@ -2,7 +2,7 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
align?: "center" | "end" | "start" | "left" | "right" | undefined;
|
|
5
|
-
spacing?: "none" | "
|
|
5
|
+
spacing?: "none" | "tight" | "loose" | "space-evenly" | "space-around" | "space-between" | "medium" | undefined;
|
|
6
6
|
};
|
|
7
7
|
events: {
|
|
8
8
|
[evt: string]: CustomEvent<any>;
|